Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1201792 - (CVE-2015-0261) CVE-2015-0261 tcpdump: IPv6 mobility printer mobility_opt_print() typecastimg/signedness error
CVE-2015-0261 tcpdump: IPv6 mobility printer mobility_opt_print() typecastimg...
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20150309,repor...
: Security
Depends On: 1201799
Blocks: 1201800 1415638
  Show dependency treegraph
 
Reported: 2015-03-13 10:13 EDT by Martin Prpič
Modified: 2017-08-01 08:14 EDT (History)
5 users (show)

See Also:
Fixed In Version: tcpdump 4.7.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-01 15:23:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1871 normal SHIPPED_LIVE Moderate: tcpdump security, bug fix, and enhancement update 2017-08-01 12:00:24 EDT

  None (edit)
Description Martin Prpič 2015-03-13 10:13:34 EDT
A flaw was found in tcpdump's IPv6 mobility printer. A remote attacker could use this flaw to cause tcpdump to crash, resulting in a denial of service, or possibly execute arbitrary code.

Upstream patch:

http://www.ca.tcpdump.org/cve/0003-test-case-for-cve2015-0261-corrupted-IPv6-mobility-h.patch
Comment 1 Martin Prpič 2015-03-13 10:17:01 EDT
Created tcpdump tracking bugs for this issue:

Affects: fedora-all [bug 1201799]
Comment 2 Stefan Cornelius 2015-03-18 11:02:28 EDT
The root of this problem is a typcasting/signedness issue introduced by the following commit https://github.com/the-tcpdump-group/tcpdump/commit/57c538422b7fcde95be3df88912f13a792ce7ccc

Previously, mobility_opt_print() would handle "len" as "int" (=positive and negative numbers), the commit changed this to "unsigned int" (=only positive numbers).

In order to understand why this caused a problem, we need to look at the buffer length check and loop a bit further down in the function:
>>  for (i = 0; i < len; i += optlen) {
>>     if (bp[i] == IP6MOPT_PAD1)

In the older version, when calling mobility_opt_print() with a negative "len", the "i < len" check would not be satisfied and we would not enter the loop and try to read from bp[i].

In the new version, the previously negative "len" would now be casted to "unsigned int", and will be turned into a (possibly large) positive number instead. Thus, this will mess up the "i < len" check and we incorrectly enter the loop and e.g. try to read from bp[i], where position "i" may now be out of the bounds of "bp".

I guess in most scenarios, this will crash due to the out-of-bounds read. If, however, you manage to somehow get around this, it may be possible to corrupt memory further down the code path - although I have not checked in depth how likely this is.
Comment 4 Fedora Update System 2015-03-30 03:00:55 EDT
tcpdump-4.7.3-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2015-03-31 17:44:19 EDT
tcpdump-4.7.3-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 6 Fedora Update System 2015-04-18 05:48:03 EDT
tcpdump-4.5.1-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 errata-xmlrpc 2017-08-01 08:14:16 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:1871 https://access.redhat.com/errata/RHSA-2017:1871

Note You need to log in before you can comment on or make changes to this bug.