nbd: fix uaf in nbd_open
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel's NBD code has a use-after-free in nbd_open. It can be triggered if someone opens an NBD device immediately after nbd_put() has freed its private data during device removal. The input does not specify authentication requirements or whether user interaction is needed.
Engineers running Linux kernels with NBD support should check their versions; affected versions are not specified.