{"id":"CVE-2023-52837","state":"PUBLISHED","title":"nbd: fix uaf in nbd_open","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnbd: fix uaf in nbd_open\n\nCommit 4af5f2e03013 (\"nbd: use blk_mq_alloc_disk and\nblk_cleanup_disk\") cleans up disk by blk_cleanup_disk() and it won't set\ndisk->private_data as NULL as before. UAF may be triggered in nbd_open()\nif someone tries to open nbd device right after nbd_put() since nbd has\nbeen free in nbd_dev_remove().\n\nFix this by implementing ->free_disk and free private data in it.","publishedAt":"2024-05-21T15:31:37.859Z","updatedAt":"2026-08-05T09:11:37.586Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4af5f2e0301311f88c420fcfc5f3c8611ade20ac","status":"affected","lessThan":"4e9b3ec84dc97909876641dad14e0a2300d6c2a3","versionType":"git"},{"version":"4af5f2e0301311f88c420fcfc5f3c8611ade20ac","status":"affected","lessThan":"879947f4180bc6e83af64eb0515e0cf57fce15db","versionType":"git"},{"version":"4af5f2e0301311f88c420fcfc5f3c8611ade20ac","status":"affected","lessThan":"56bd7901b5e9dbc9112036ea615ebcba1565fafe","versionType":"git"},{"version":"4af5f2e0301311f88c420fcfc5f3c8611ade20ac","status":"affected","lessThan":"327462725b0f759f093788dfbcb2f1fd132f956b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/nbd.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.14","versionType":"semver"},{"version":"6.1.63","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.5.12","status":"unaffected","lessThanOrEqual":"6.5.*","versionType":"semver"},{"version":"6.6.2","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/nbd.c"]}],"references":["https://git.kernel.org/stable/c/4e9b3ec84dc97909876641dad14e0a2300d6c2a3","https://git.kernel.org/stable/c/879947f4180bc6e83af64eb0515e0cf57fce15db","https://git.kernel.org/stable/c/56bd7901b5e9dbc9112036ea615ebcba1565fafe","https://git.kernel.org/stable/c/327462725b0f759f093788dfbcb2f1fd132f956b"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/52xxx/CVE-2023-52837.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-52837","state":"PUBLISHED","datePublished":"2024-05-21T15:31:37.859Z","dateUpdated":"2026-08-05T09:11:37.586Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-21T15:19:24.253Z"},"containers":{"cna":{"title":"nbd: fix uaf in nbd_open","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnbd: fix uaf in nbd_open\n\nCommit 4af5f2e03013 (\"nbd: use blk_mq_alloc_disk and\nblk_cleanup_disk\") cleans up disk by blk_cleanup_disk() and it won't set\ndisk->private_data as NULL as before. UAF may be triggered in nbd_open()\nif someone tries to open nbd device right after nbd_put() since nbd has\nbeen free in nbd_dev_remove().\n\nFix this by implementing ->free_disk and free private data in it."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4af5f2e0301311f88c420fcfc5f3c8611ade20ac","status":"affected","lessThan":"4e9b3ec84dc97909876641dad14e0a2300d6c2a3","versionType":"git"},{"version":"4af5f2e0301311f88c420fcfc5f3c8611ade20ac","status":"affected","lessThan":"879947f4180bc6e83af64eb0515e0cf57fce15db","versionType":"git"},{"version":"4af5f2e0301311f88c420fcfc5f3c8611ade20ac","status":"affected","lessThan":"56bd7901b5e9dbc9112036ea615ebcba1565fafe","versionType":"git"},{"version":"4af5f2e0301311f88c420fcfc5f3c8611ade20ac","status":"affected","lessThan":"327462725b0f759f093788dfbcb2f1fd132f956b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/nbd.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.14","versionType":"semver"},{"version":"6.1.63","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.5.12","status":"unaffected","lessThanOrEqual":"6.5.*","versionType":"semver"},{"version":"6.6.2","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/block/nbd.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/4e9b3ec84dc97909876641dad14e0a2300d6c2a3"},{"url":"https://git.kernel.org/stable/c/879947f4180bc6e83af64eb0515e0cf57fce15db"},{"url":"https://git.kernel.org/stable/c/56bd7901b5e9dbc9112036ea615ebcba1565fafe"},{"url":"https://git.kernel.org/stable/c/327462725b0f759f093788dfbcb2f1fd132f956b"}],"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 bug is reached by opening the local NBD block device node (/dev/nbdX) via the normal block open path into nbd_open; the kernel NBD code is a client and this UAF is not triggered by remote packet processing.\nAC:L - The attacker can drive both sides of the teardown-vs-open race (e.g., close triggering destroy with DESTROY_ON_DISCONNECT/DISCONNECT_ON_CLOSE while concurrently opening), so success does not depend on conditions outside attacker control.\nPR:L - nbd_open has no capability check and is reachable to a local user who can open the NBD device node; while creating/configuring NBD needs CAP_SYS_ADMIN in the init namespace, exploitation of an existing destroy-on-disconnect device does not require full admin rights.\nUI:N - The attacker triggers the vulnerability directly by opening/closing the NBD device; no separate victim action is required.\nS:U - This is a standard in-kernel UAF enabling local privilege escalation within the same OS security authority, with no VM escape or other cross-boundary impact.\nC:H - Use-after-free of the nbd_device object allows reclaim and reuse of the freed object, which can be leveraged for arbitrary kernel memory disclosure.\nI:H - The same UAF can be turned into heap spray and control-flow hijacking primitives, enabling arbitrary kernel writes or code execution.\nA:H - Dereferencing the freed nbd_device in nbd_open can cause kernel oops/panic even without full exploitation, so availability impact is high."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:11:37.586Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.1.63"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.5.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.6.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.7"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2023-52837","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-05-21T18:01:48.631616Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:23:20.566Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/4e9b3ec84dc97909876641dad14e0a2300d6c2a3","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/879947f4180bc6e83af64eb0515e0cf57fce15db","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/56bd7901b5e9dbc9112036ea615ebcba1565fafe","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/327462725b0f759f093788dfbcb2f1fd132f956b","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T23:11:36.041Z"}}]}}}