Bug 1400904 (CVE-2016-9755)

Summary: CVE-2016-9755 kernel: netfilter: Out-of-bounds write due to a signedness issue when defragmenting IPv6 packets
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: agordeev, anemec, aquini, arm-mgr, bhu, dhoward, esammons, fhrbata, gansalmon, iboverma, ichavero, itamar, jforbes, jkacur, jkastner, joelsmith, jonathan, jross, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, lwang, madhu.chinakonda, matt, mchehab, mcressma, mguzik, nmurray, pholasek, plougher, pmatouse, rt-maint, rvrbovsk, slawomir, sparks, williams, wmealing
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
An attacker on a network could abuse a flaw in the IPv6 stack fragment reassembly code to induce kernel memory corruption on the system, possibly leading to a system crash.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-05 06:44:09 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: 1400905, 1405266    
Bug Blocks: 1400906    

Description Andrej Nemec 2016-12-02 09:29:46 UTC
A flaw was found in the Linux kernel networking stack in which an attacker can create crafted fragmented IPV6 packets that require reassembly. The network header offset in the reassembly process is assumed to be located in an offset prior to the fragment in memory.  

In some situations during fragment reassembly the header may be reconstructed in the assumed location and overwrite kernel memory with another header.

The flaw involves an issue that all network headers before fragment header are pulled. Normal ipv6 reassembly will drop the skb when errors occur further down the line.

The netfilter reassembly code neglects to do this correctly and instead passed the original fragment along.  That was also fine back when netfilter ipv6 defrag worked with cloned fragments, as the original, pristine fragment was passed on.

An attacker on the network could use this flaw to induce kernel memory corruption on the system, leading to a crash. Due to the nature of the flaw, privilege escalation cannot be fully ruled out, although we believe it is unlikely.

References:

http://seclists.org/oss-sec/2016/q4/556
https://groups.google.com/forum/#!topic/syzkaller/GFbGpX7nTEo

Patch:

https://www.spinics.net/lists/netdev/msg407525.html

Comment 1 Andrej Nemec 2016-12-02 09:30:18 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1400905]