iommufd: Set veventq_depth upper bound
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.18.397.1.47.2In the Linux kernel, the following vulnerability has been resolved:
iommufd: Set veventq_depth upper bound
iommufd_veventq_alloc() accepts any !0 veventq_depth from userspace, with an upper bound at U32_MAX.
This leaves a vulnerability where userspace can allocate excessively large queues to exhaust kernel memory reserves.
Cap the veventq_depth (maximum number of entries) to 1 << 19, matching the maximum number of entries in the SMMUv3 EVTQ (the largest use case today).
From the CVE record · Linux
The Linux kernel's iommufd_veventq_alloc() accepts excessively large queue depths from userspace. A local user who can invoke it can exhaust kernel memory reserves by allocating large queues. The input does not specify whether authentication or additional privileges are required.
Engineers running the Linux kernel should check their versions for this iommufd issue; affected versions are not specified.