Bug 1489088 (CVE-2017-9725)

Summary: CVE-2017-9725 kernel: Incorrect type conversion for size during dma allocation
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: airlied, ajax, aquini, bhu, blc, bskeggs, dhoward, eparis, esandeen, fhrbata, hdegoede, hkrzesin, hwkernel-mgr, iboverma, ichavero, itamar, jarodwilson, jforbes, jglisse, jkacur, jonathan, josef, jross, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, linville, matt, mchehab, mcressma, mjg59, mlangsdo, nhorman, nmurray, plougher, quintela, rt-maint, rvrbovsk, slawomir, williams, wmealing
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 4.3 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found where the kernel truncated the value used to indicate the size of a buffer which it would later become zero using an untruncated value. This can corrupt memory outside of the original allocation.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 03:24:47 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: 1489089, 1495401, 1495402, 1495403, 1495404, 1495405, 1495406, 1495407    
Bug Blocks: 1489091    

Description Adam Mariš 2017-09-06 16:28:21 UTC
A flaw was found in the Linux kernels implementation of DMA memory allocation.

When allocating a DMA buffer, a section of memory is allocated and then set to zeros.  The size parameter of allocation was truncated due to an incorrect casting when the allocation function is called.  During clearing the allocation used an untruncated value as the size to clear and would "zero" a larger section of kernel memory than was allocated, possibly corrupting memory and allowing for privilege escalation.

At this time Red Hat Product Security believes that there is no direct control of the size parameter used in this function in Red Hat kernels.

Patch:

https://source.codeaurora.org/quic/la/kernel/msm-4.4/commit/?h=aosp/android-4.4&id=1f8f9b566e8446c13b954220c226c58d22076f88

Comment 1 Adam Mariš 2017-09-06 16:29:29 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1489089]

Comment 2 Adam Mariš 2017-09-06 16:47:16 UTC
External References:

https://source.android.com/security/bulletin/2017-09-01

Comment 3 Justin M. Forbes 2017-09-06 18:10:40 UTC
This was fixed upstream 2 years ago, it was never an issue in any currently supported Fedora release.

Comment 4 Adam Mariš 2017-09-07 08:48:58 UTC
Mainline kernel patch:

https://github.com/torvalds/linux/commit/67a2e213e7e937c41c52ab5bc46bf3f4de469f6e

Comment 6 Wade Mealing 2017-09-26 01:59:24 UTC
Statement:

This issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5 and 6.

This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 7 and MRG-2.

Future Linux kernel updates for the respective releases may address this issue.

Comment 10 errata-xmlrpc 2018-04-10 08:06:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 11 errata-xmlrpc 2018-04-10 09:29:45 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 12 errata-xmlrpc 2018-04-17 15:29:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise MRG 2

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

Comment 13 errata-xmlrpc 2018-04-17 16:19:48 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.4 Extended Update Support

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