CVE-2017-7187: Buffer Overflow

Published Mar 20, 2017
·
Updated

Last updated 29 November 2024

Other sources

The sgioctl 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 SGNEXTCMDLEN ioctl call, leading to out-of-bounds write access in the sgwrite 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

— Red Hat

The sgioctl function in drivers/scsi/sg.c in the Linux kernel through 4.10.4 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 SGNEXTCMDLEN ioctl call, leading to out-of-bounds write access in the sgwrite function.

— Launchpad

Affected Software

32 affected componentsFixes available
Linux Linux kernel<3.18.50
Linux Linux kernel>=3.19<4.1.40
Linux Linux kernel>=4.2<4.4.60
Linux Linux kernel>=4.5<4.9.21
Linux Linux kernel>=4.10<4.10.9
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1
ubuntu/linux<3.13.0-132.181
3.13.0-132.181
ubuntu/linux-lts-xenial<4.4.0-78.99~14.04.2
4.4.0-78.99~14.04.2
ubuntu/linux<4.4.0-78.99
4.4.0-78.99
ubuntu/linux-aws<4.4.0-1017.26
4.4.0-1017.26
ubuntu/linux-gke<4.4.0-1013.13
4.4.0-1013.13
ubuntu/linux-hwe<4.10.0-32.36~16.04.1
4.10.0-32.36~16.04.1
ubuntu/linux-raspi2<4.4.0-1055.62
4.4.0-1055.62
ubuntu/linux-snapdragon<4.4.0-1058.62
4.4.0-1058.62
ubuntu/linux-azure*
ubuntu/linux-gcp*
ubuntu/linux-hwe*
ubuntu/linux-hwe-edge*
ubuntu/linux-oem*
ubuntu/linux-azure-fde*
ubuntu/linux-azure-fde-5.15*
ubuntu/linux-gke*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
ubuntu/linux-intel-iot-realtime*
ubuntu/linux-realtime*
ubuntu/linux-riscv*
ubuntu/linux-azure-6.11*
ubuntu/linux-gcp-6.11*
ubuntu/linux-hwe-6.11*
ubuntu/linux-lowlatency-hwe-6.11*
ubuntu/linux-raspi-realtime*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.22-1Fixed in 6.12.25-1
  2. Upgrade

    Upgrade ubuntu/linux to a version that resolves this vulnerability.

    Fixed in 3.13.0-132.181
  3. Upgrade

    Upgrade ubuntu/linux-lts-xenial to a version that resolves this vulnerability.

    Fixed in 4.4.0-78.99~14.04.2
  4. Upgrade

    Upgrade ubuntu/linux to a version that resolves this vulnerability.

    Fixed in 4.4.0-78.99
  5. Upgrade

    Upgrade ubuntu/linux-aws to a version that resolves this vulnerability.

    Fixed in 4.4.0-1017.26
  6. Upgrade

    Upgrade ubuntu/linux-gke to a version that resolves this vulnerability.

    Fixed in 4.4.0-1013.13
  7. Upgrade

    Upgrade ubuntu/linux-hwe to a version that resolves this vulnerability.

    Fixed in 4.10.0-32.36~16.04.1
  8. Upgrade

    Upgrade ubuntu/linux-raspi2 to a version that resolves this vulnerability.

    Fixed in 4.4.0-1055.62
  9. Upgrade

    Upgrade ubuntu/linux-snapdragon to a version that resolves this vulnerability.

    Fixed in 4.4.0-1058.62
  10. Upgrade

    Upgrade linux kernel to a version that resolves this vulnerability.

    Fixed in 4.10.4
  11. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch bf33f87dd04c371ea33feb821b60d63d754e3124

Event History

Mar 20, 2017
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityAffected Software
Data Sourced
via OSV·12:00 AM
DescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
RemedyDescriptionAffected Software
Updated
via Ubuntu·12:00 AM
Description
CVE Published
via MITRE·02:00 PM
Data Sourced
via MITRE·02:00 PM
Description
Feb 17, 2021
Data Sourced
via Red Hat·02:26 AM
DescriptionSeverityAffected Software
Feb 10, 2023
Data Sourced
12:53 AM
Weakness
Data Sourced
via NVD·12:53 AM
RemedyDescriptionSeverityWeaknessAffected Software
Updated
via NVD·12:53 AM
Affected Software
Nov 21, 2024
Updated
via NVD·03:31 AM
RemedyAffected Software
Apr 20, 2025
Updated
via NVD·01:37 AM
Affected Software

Frequently Asked Questions

1

What is CVE-2017-7187?

CVE-2017-7187 is a vulnerability in the Linux kernel that allows local users to cause a denial of service or have unspecified other impact.

2

How severe is CVE-2017-7187?

CVE-2017-7187 has a severity rating of medium.

3

What is the affected software for CVE-2017-7187?

The affected software for CVE-2017-7187 includes the Linux kernel versions up to 4.10.4 and specific Ubuntu Linux versions.

4

How do I fix CVE-2017-7187?

To fix CVE-2017-7187, update your Linux kernel to version 4.11~ or apply the specific Ubuntu Linux patches provided.

5

Where can I find more information about CVE-2017-7187?

You can find more information about CVE-2017-7187 in the references provided, including the Git commit, a GitHub gist, and a Bugzilla entry.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203