{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-56764","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-12-29T11:26:39.762Z","datePublished":"2025-01-06T16:20:43.256Z","dateUpdated":"2026-08-05T11:46:24.574Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:46:24.574Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nublk: detach gendisk from ublk device if add_disk() fails\n\nInside ublk_abort_requests(), gendisk is grabbed for aborting all\ninflight requests. And ublk_abort_requests() is called when exiting\nthe uring context or handling timeout.\n\nIf add_disk() fails, the gendisk may have been freed when calling\nublk_abort_requests(), so use-after-free can be caused when getting\ndisk's reference in ublk_abort_requests().\n\nFixes the bug by detaching gendisk from ublk device if add_disk() fails."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is reached through an io_uring passthrough control command on the local /dev/ublk-control device; no network vector exists.\nAC:L - After add_disk() fails, ub->ub_disk is a persistent dangling pointer (not a narrow race window), and the attacker deterministically triggers the abort path by exiting the io_uring daemon they control.\nPR:L - ublk explicitly supports UBLK_F_UNPRIVILEGED_DEV, allowing a non-CAP_SYS_ADMIN user to create and start a user-owned ublk device, so an unprivileged local user can reach ublk_ctrl_start_dev().\nUI:N - The attacker performs all steps (create device, run daemon, start dev, exit daemon) with no victim interaction required.\nS:U - The use-after-free is confined to the kernel's own memory and privilege domain with no crossing of a security boundary.\nC:H - The UAF on the freed gendisk can be reallocated and sprayed by the attacker, enabling disclosure of controlled/adjacent kernel memory contents.\nI:H - The UAF writes into freed memory (get_device refcount) and dereferences disk->queue, giving heap-spray-based write/control-flow primitives.\nA:H - Dereferencing and modifying the freed gendisk reliably causes kernel memory corruption and oops/panic."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/ublk_drv.c"],"versions":[{"version":"bd23f6c2c2d00518e2f27f2d25cef795de9bee56","lessThan":"7d680f2f76a3417fdfc3946da7471e81464f7b41","status":"affected","versionType":"git"},{"version":"bd23f6c2c2d00518e2f27f2d25cef795de9bee56","lessThan":"75cd4005da5492129917a4a4ee45e81660556104","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/ublk_drv.c"],"versions":[{"version":"6.7","status":"affected"},{"version":"0","lessThan":"6.7","status":"unaffected","versionType":"semver"},{"version":"6.12.8","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.13","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.12.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.13"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/7d680f2f76a3417fdfc3946da7471e81464f7b41"},{"url":"https://git.kernel.org/stable/c/75cd4005da5492129917a4a4ee45e81660556104"}],"title":"ublk: detach gendisk from ublk device if add_disk() fails","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-56764","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-02-11T15:41:19.788451Z"}}}],"problemTypes":[{"descriptions":[{"lang":"en","type":"CWE","cweId":"CWE-416","description":"CWE-416 Use After Free"}]}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2025-02-11T15:45:20.712Z"}}]}}