CVE-2023-52837 nbd: fix uaf in nbd_open
A use-after-free vulnerability in the Linux kernel's NBD driver allows local attackers to potentially execute code or escalate privileges.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-52837?
CVE-2023-52837 is a high-severity use after free vulnerability in Linux kernel, published on 21 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
nbd: fix uaf in nbd_open
Commit 4af5f2e03013 ("nbd: use blk_mq_alloc_disk and blk_cleanup_disk") cleans up disk by blk_cleanup_disk() and it won't set disk->private_data as NULL as before. UAF may be triggered in nbd_open() if someone tries to open nbd device right after nbd_put() since nbd has been free in nbd_dev_remove().
Fix this by implementing ->free_disk and free private data in it.
Weakness: CWE-416
Which versions are affected by CVE-2023-52837?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2023-52837?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2023-52837 being exploited?
There is no known exploitation of CVE-2023-52837 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-55636, BELL-CVE-2023-52837, DEBIAN-CVE-2023-52837, GHSA-hgcx-34qp-j38m, ROOT-OS-UBUNTU-2204-CVE-2023-52837, UBUNTU-CVE-2023-52837.