# CVE-2024-35954: scsi: sg: Avoid sg device teardown race

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-01)
- Published: 2024-05-20T09:41:47.944Z
- Modified: 2026-08-05T11:31:11.820Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

scsi: sg: Avoid sg device teardown race

sg_remove_sfp_usercontext() must not use sg_device_destroy() after calling
scsi_device_put().

sg_device_destroy() is accessing the parent scsi_device request_queue which
will already be set to NULL when the preceding call to scsi_device_put()
removed the last reference to the parent scsi_device.

The resulting NULL pointer exception will then crash the kernel.

(As written by CVE List.)

## Affected

- Linux Linux: from db59133e927916d8a25ee1fd8264f2808040909d before 46af9047523e2517712ae8e71d984286c626e022; from db59133e927916d8a25ee1fd8264f2808040909d before b0d1ebcc1a9560e494ea9b3ee808540db26c5086; from db59133e927916d8a25ee1fd8264f2808040909d before 27f58c04a8f438078583041468ec60597841284d; 4cc664e59bf2553771e4c9e90f758f7434cfdc22; from 6.4.7 before 6.5; 6.5 (not affected: before 6.5; from 6.6.28 up to 6.6.*; from 6.8.7 up to 6.8.*; from 6.9 up to *)
- linux linux_kernel: from 6.4.7 before 6.6.28; from 6.7 before 6.8.7; 6.9

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/46af9047523e2517712ae8e71d984286c626e022> (patch)
- <https://git.kernel.org/stable/c/b0d1ebcc1a9560e494ea9b3ee808540db26c5086> (patch)
- <https://git.kernel.org/stable/c/27f58c04a8f438078583041468ec60597841284d> (patch)

## Sources

- CVE List: [CVE-2024-35954](https://www.cve.org/CVERecord?id=CVE-2024-35954), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-35954](https://nvd.nist.gov/vuln/detail/CVE-2024-35954), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2024-35954 · Whole record: https://cve.day/CVE-2024-35954.json · Rebuilt by cve.day 2026-11-25T22:58:40.634Z
