Bug 550907 (CVE-2009-4537)

Summary: CVE-2009-4537 kernel: r8169 issue reported at 26c3
Product: [Other] Security Response Reporter: Eugene Teo (Security Response) <eteo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: anton, arozansk, bhu, davej, davem, dhoward, gbarros, hjia, iannis, jkacur, jlieskov, jolsa, jpirko, jskrabal, kmcmartin, kzhang, lgoncalv, lwang, nhorman, pmatouse, rcvalle, security-response-team, syeghiay, tao, tcallawa, vgoyal, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-28 08:40:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 547593, 550908, 550909, 550910, 550911, 550912, 550913, 550914, 550915, 550916, 553541, 586017    
Bug Blocks:    

Description Eugene Teo (Security Response) 2009-12-28 03:30:42 UTC
Description of problem:
This was disclosed at 26c3.

Fabian also mentioned the fix for CVE-2009-1389 regarding the r8169 driver introduces a similar security problem as this: http://git.kernel.org/linus/fdd7b4c3302c93f6833e338903ea77245eb510b4

- RTL_W16(RxMaxSize, 16383);
+ RTL_W16(RxMaxSize, rx_buf_sz);

is actually a revert of this:
http://git.kernel.org/linus/126fa4b9ca5d9d7cb7d46f779ad3bd3631ca387c

- /* For gigabit rtl8169, MTU + header + CRC + VLAN */
- RTL_W16(RxMaxSize, tp->rx_buf_sz);
+ /* Low hurts. Let's disable the filtering. */
+ RTL_W16(RxMaxSize, 16383);

The accompanying comment for the original commit (126fa):

The size of the incoming frame is not correctly checked.

The RxMaxSize register (0xDA) does not work as expected and incoming frames whose size exceeds the MTU actually end spanning multiple descriptors. The first Rx descriptor contains the size of the whole frame (or some garbage in its place). The driver does not expect something above the space allocated to the current skb and crashes loudly when it issues a skb_put.

The fix contains two parts:
- disable hardware Rx size filtering: so far it only proved to be able
to trigger some new fancy errors;
[...]

warned of issues when using hardware Rx size filtering and Fabian claimed to be able to trigger something similar to the e1000 bug when using a specific packet size.

References:
http://events.ccc.de/congress/2009/Fahrplan//events/3596.en.html
http://blog.c22.cc/2009/12/27/26c3-cat-procsysnetipv4fuckups/
http://twitter.com/dakami/statuses/7104238406
https://bugzilla.redhat.com/CVE-2009-1389
http://www.securityfocus.com/bid/37521

Comment 4 Eugene Teo (Security Response) 2009-12-29 01:49:58 UTC
Patch discussions:
CVE-2009-4536
[PATCH] e1000: enhance frame fragment detection
http://marc.info/?t=126203102000001&r=1&w=2

CVE-2009-4537
[PATCH RFC] r8169: straighten out overlength frame detection
http://marc.info/?t=126202986900002&r=1&w=2

CVE-2009-4538
We might need a fix for e1000e/netdev.c too, informed Neil.

Comment 10 errata-xmlrpc 2010-01-07 23:35:31 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2010:0019 https://rhn.redhat.com/errata/RHSA-2010-0019.html

Comment 11 errata-xmlrpc 2010-01-08 00:43:41 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4

Via RHSA-2010:0020 https://rhn.redhat.com/errata/RHSA-2010-0020.html

Comment 13 errata-xmlrpc 2010-01-20 00:07:50 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5.3.Z - Server Only

Via RHSA-2010:0053 https://rhn.redhat.com/errata/RHSA-2010-0053.html

Comment 14 errata-xmlrpc 2010-01-21 14:10:46 UTC
This issue has been addressed in following products:

  MRG for RHEL-5

Via RHSA-2010:0041 https://rhn.redhat.com/errata/RHSA-2010-0041.html

Comment 17 errata-xmlrpc 2010-02-02 21:01:51 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5.2 Z Stream

Via RHSA-2010:0079 https://rhn.redhat.com/errata/RHSA-2010-0079.html

Comment 18 Fedora Update System 2010-02-03 17:13:12 UTC
kernel-2.6.30.10-105.2.13.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/kernel-2.6.30.10-105.2.13.fc11

Comment 19 Fedora Update System 2010-02-05 01:48:04 UTC
kernel-2.6.30.10-105.2.13.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 errata-xmlrpc 2010-02-09 15:24:00 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Virtualization for RHEL-5

Via RHSA-2010:0095 https://rhn.redhat.com/errata/RHSA-2010-0095.html

Comment 21 Fedora Update System 2010-02-09 22:15:08 UTC
kernel-2.6.31.12-174.2.17.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/kernel-2.6.31.12-174.2.17.fc12

Comment 22 Fedora Update System 2010-02-16 13:18:34 UTC
kernel-2.6.31.12-174.2.19.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 errata-xmlrpc 2010-02-16 17:05:20 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4.7 Z Stream

Via RHSA-2010:0111 https://rhn.redhat.com/errata/RHSA-2010-0111.html

Comment 24 John Kacur 2010-04-08 15:13:33 UTC
git describe --contains 8c96206544955131f6d7cef09371950f34ebca5a
v2.6.33.2~16
git describe --contains c0cd884af045338476b8e69a61fceb3f34ff22f1
v2.6.34-rc3~9^2

In other words, it is fixed in stable release 2.6.33.2
and will be fixed in 2.6.35

Comment 26 Xiao jing Fang 2010-08-16 06:15:06 UTC
no specify hardware in beaker,
Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)