diff options
| author | Qihang Tang <q.h.hack.winter@gmail.com> | 2026-05-08 12:46:59 +0300 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2026-06-10 09:14:01 +0300 |
| commit | e440e077748939839d9f76e24383b76b785f80ce (patch) | |
| tree | b387f888c9d548c1f1a49d0c3ec1be3b7c3e511f /include | |
| parent | bb26ed5f3a8b233e8389b6f946cb1ec269cf45e9 (diff) | |
| download | linux-e440e077748939839d9f76e24383b76b785f80ce.tar.xz | |
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.
Fixes: c8a6153b6c59 ("vduse: Introduce VDUSE - vDPA Device in Userspace")
Signed-off-by: Qihang Tang <q.h.hack.winter@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20260508094659.94647-1-q.h.hack.winter@gmail.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
