Bug 1474928 (CVE-2017-11600)

Summary: CVE-2017-11600 kernel: Out-of-bounds access via an XFRM_MSG_MIGRATE xfrm Netlink message
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: aquini, bhu, blc, dhoward, dominik.mierzejewski, esammons, fhrbata, gansalmon, hkrzesin, hwkernel-mgr, iboverma, ichavero, itamar, jforbes, jkacur, jonathan, jross, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, lwang, madhu.chinakonda, matt, mchehab, mcressma, mguzik, mlangsdo, nmurray, pholasek, plougher, ppandit, rt-maint, rvrbovsk, slawomir, vdronov, williams, xmu, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20170711,reported=20170711,source=bugtraq,cvss3=5.5/CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H,cwe=CWE-125,rhel-5/kernel=notaffected,rhel-6/kernel=notaffected,rhel-7/kernel=affected,rhel-7/kernel-rt=affected,mrg-2/realtime-kernel=affected,rhel-7/kernel-alt=affected,fedora-all/kernel=affected
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The xfrm_migrate() function in the net/xfrm/xfrm_policy.c file in the Linux kernel built with CONFIG_XFRM_MIGRATE does not verify if the dir parameter is less than XFRM_POLICY_MAX. This allows a local attacker to cause a denial of service (out-of-bounds access) or possibly have unspecified other impact by sending a XFRM_MSG_MIGRATE netlink message. This flaw is present in the Linux kernel since an introduction of XFRM_MSG_MIGRATE in 2.6.21-rc1, up to 4.13-rc3.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 1479417, 1479421, 1479422, 1474929, 1479418, 1479419, 1479420    
Bug Blocks: 1474933    
Attachments:
Description Flags
xfrm_migrate_panic_dmesg.txt none

Description Andrej Nemec 2017-07-25 12:05:25 EDT
xfrm_migrate() function in net/xfrm/xfrm_policy.c file in the Linux kernel build with CONFIG_XFRM_MIGRATE does not check that the dir parameter is less than XFRM_POLICY_MAX. This allows a local attacker cause a denial of service (out-of-bounds access) or possibly have unspecified other impact by sending a XFRM_MSG_MIGRATE netlink message. This flaw is present in the Linux kernel since an introduction of XFRM_MSG_MIGRATE in 2.6.21-rc1 and upto 4.13-rc3.

References:

http://seclists.org/bugtraq/2017/Jul/30

http://marc.info/?t=150169629800003&r=1&w=2

http://marc.info/?l=linux-netdev&m=150169627919528&w=2

Suggested upstream patch:

https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git/commit/?id=7bab09631c2a303f87a7eb7e3d69e888673b9b7e

An upstream patch:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7bab09631c2a303f87a7eb7e3d69e888673b9b7e
Comment 1 Andrej Nemec 2017-07-25 12:06:11 EDT
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1474929]
Comment 2 Vladis Dronov 2017-08-02 12:16 EDT
Created attachment 1308338 [details]
xfrm_migrate_panic_dmesg.txt
Comment 6 Vladis Dronov 2017-08-08 10:30:20 EDT
Statement:

This issue does not affect the versions of the Linux kernel as shipped with Red Hat Enterprise Linux 5, 6 as the code with the flaw is not present in the products listed or is not exploitable.

This issue affects the versions of the Linux kernel as shipped with Red Hat Enterprise Linux 7 and Red Hat Enterprise MRG 2. Future kernel updates for these products may address this issue.
Comment 7 Justin M. Forbes 2018-01-29 11:27:54 EST
This was fixed for Fedora with the 4.12.11 stable updates
Comment 11 errata-xmlrpc 2018-06-26 12:50:09 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:1965 https://access.redhat.com/errata/RHSA-2018:1965
Comment 12 errata-xmlrpc 2018-06-26 12:51:14 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2018:2003 https://access.redhat.com/errata/RHSA-2018:2003