Bug 1434327 (CVE-2017-7187) - CVE-2017-7187 kernel: scsi: Stack-based buffer overflow in sg_ioctl function
Summary: CVE-2017-7187 kernel: scsi: Stack-based buffer overflow in sg_ioctl function
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2017-7187
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1439043 1439044 1439045 1439046 1439047 1439048 1439049
Blocks: 1434328
TreeView+ depends on / blocked
 
Reported: 2017-03-21 09:54 UTC by Andrej Nemec
Modified: 2021-02-17 02:26 UTC (History)
32 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
The sg_ioctl function in drivers/scsi/sg.c in the Linux kernel allows local users to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impacts via a large command size in an SG_NEXT_CMD_LEN ioctl call, leading to out-of-bounds write access in the sg_write function.
Clone Of:
Environment:
Last Closed: 2019-06-08 03:09:17 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1842 0 normal SHIPPED_LIVE Important: kernel security, bug fix, and enhancement update 2017-08-01 18:22:09 UTC
Red Hat Product Errata RHSA-2017:2077 0 normal SHIPPED_LIVE Important: kernel-rt security, bug fix, and enhancement update 2017-08-01 18:13:37 UTC
Red Hat Product Errata RHSA-2017:2669 0 normal SHIPPED_LIVE Important: kernel-rt security and bug fix update 2017-09-07 00:36:52 UTC

Description Andrej Nemec 2017-03-21 09:54:33 UTC
The sg_ioctl function in drivers/scsi/sg.c in the Linux kernel allows local users to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a large command size in an SG_NEXT_CMD_LEN ioctl call, leading to out-of-bounds write access in the sg_write function.

Upstream patch:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bf33f87dd04c371ea33feb821b60d63d754e3124

References:

https://gist.github.com/dvyukov/48ad14e84de45b0be92b7f0eda20ff1b

Comment 2 Wade Mealing 2017-04-05 05:55:52 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1439045]

Comment 4 Wade Mealing 2017-04-05 06:20:34 UTC
Statement:

This issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5, 6, as the change that introduced the flaw is not present in the code of these products. 

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 6 errata-xmlrpc 2017-08-01 19:14:30 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 7 errata-xmlrpc 2017-08-02 07:54:42 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 8 errata-xmlrpc 2017-09-06 20:40:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise MRG 2

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


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