scsi: sg: Avoid sg device teardown race
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.6.28, 6.8.7
- CVEs
- CVE-2024-35954
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 01:59 UTC · Revision 1
Source evidence
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.
osv:CVE-2024-35954
Kernel
Fixed versions: 6.6.28, 6.8.7
Complete source record
{
"id": "1b1cc1826d42a2c2f0844e78fda1a3d2d059ed2dae53d33b2e3126fb8774ce09",
"url": "https://osv.dev/vulnerability/CVE-2024-35954",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "scsi: sg: Avoid sg device teardown race",
"summary": "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.",
"evidence": "osv:CVE-2024-35954",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.6.28",
"evidence": "/affected/1/ranges"
},
{
"value": "6.8.7",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2024-35954",
"aliases": [
"CVE-2024-35954"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "db59133e927916d8a25ee1fd8264f2808040909d"
},
{
"fixed": "46af9047523e2517712ae8e71d984286c626e022"
},
{
"fixed": "b0d1ebcc1a9560e494ea9b3ee808540db26c5086"
},
{
"fixed": "27f58c04a8f438078583041468ec60597841284d"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.4.7"
},
{
"fixed": "6.5"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "4cc664e59bf2553771e4c9e90f758f7434cfdc22"
}
]
}
],
"versions": [
"v6.4.16",
"v6.4.15",
"v6.4.14",
"v6.4.13",
"v6.4.12",
"v6.4.11",
"v6.4.10",
"v6.4.9",
"v6.4.8",
"v6.4.7"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-35954.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.5.0"
},
{
"fixed": "6.6.28"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.8.7"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-35954.json"
}
}
],
"modified": "2026-10-28T02:30:41.982610798Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/27f58c04a8f438078583041468ec60597841284d",
"https://git.kernel.org/stable/c/46af9047523e2517712ae8e71d984286c626e022",
"https://git.kernel.org/stable/c/b0d1ebcc1a9560e494ea9b3ee808540db26c5086",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35954.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-35954",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35954.json"
}
},
"related_cves": [
{
"value": "CVE-2024-35954",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 509270,
"published_at": "2024-05-20T09:41:47.944+00:00"
}