vduse: hold vduse_lock across IDR lookup in open path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c8a6153b6c59d95c0e091f053f6f180952ade91e · < 79e12c891940b0c4c75881b7fd82a8cbb8ac97be| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
vduse: hold vduse_lock across IDR lookup in open path
vduse_dev_open() looks up struct vduse_dev through the IDR and then acquires dev->lock only after vduse_lock has been dropped.
This leaves a window where a concurrent VDUSE_DESTROY_DEV can remove the same object from the IDR and free it before the open path locks the device, leading to a use-after-free.
Close this race by keeping vduse_lock held until dev->lock has been acquired in the open path, matching the lock ordering already used by the destroy path.
From the CVE record · Linux
The Linux kernel’s VDUSE open path can use a device after it has been freed. This can happen when a device open races with a concurrent VDUSE_DESTROY_DEV operation. The input does not specify whether authentication or user interaction is required.
Engineers running the Linux kernel with VDUSE should check their installations; affected versions are not specified.