xen: privcmd: Fix possible access to a freed kirqfd instance
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 |
|
|
6.6.516.10.106.11In the Linux kernel, the following vulnerability has been resolved:
xen: privcmd: Fix possible access to a freed kirqfd instance
Nothing prevents simultaneous ioctl calls to privcmd_irqfd_assign() and privcmd_irqfd_deassign(). If that happens, it is possible that a kirqfd created and added to the irqfds_list by privcmd_irqfd_assign() may get removed by another thread executing privcmd_irqfd_deassign(), while the former is still using it after dropping the locks.
This can lead to a situation where an already freed kirqfd instance may be accessed and cause kernel oops.
Use SRCU locking to prevent the same, as is done for the KVM implementation for irqfds.
From the CVE record · Linux
The Linux kernel’s Xen privcmd irqfd handling can access a freed kirqfd instance. Simultaneous local ioctl calls to assign and deassign an irqfd can trigger the issue and cause a kernel oops; the input does not specify authentication requirements.
Engineers running Linux kernels with Xen privcmd irqfd support should check whether their kernel is affected; affected versions are not specified.