CVE-2024-56624: iommufd: Fix out_fput in iommufd_fault_alloc()
In the Linux kernel, the following vulnerability has been resolved:
iommufd: Fix outfput in iommufdfaultalloc()
As fput() calls the file->fop->release op, where fault obj and ictx are getting released, there is no need to release these two after fput() one more time, which would result in imbalanced refcounts: refcountt: decrement hit 0; leaking memory. WARNING: CPU: 48 PID: 2369 at lib/refcount.c:31 refcountwarnsaturate+0x60/0x230 Call trace: refcountwarnsaturate+0x60/0x230 (P) refcountwarnsaturate+0x60/0x230 (L) iommufdfaultfopsrelease+0x9c/0xe0 [iommufd] ... VFS: Close: file count is 0 (fop=iommufdfops [iommufd]) WARNING: CPU: 48 PID: 2369 at fs/open.c:1507 filpflush+0x3c/0xf0 Call trace: filpflush+0x3c/0xf0 (P) filpflush+0x3c/0xf0 (L) arm64sysclose+0x34/0x98 ... imbalanced put on file reference count WARNING: CPU: 48 PID: 2369 at fs/file.c:74 filerefput+0x100/0x138 Call trace: filerefput+0x100/0x138 (P) filerefput+0x100/0x138 (L) fputsync+0x4c/0xd0
Drop those two lines to fix the warnings above.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.27-1
Event History
Frequently Asked Questions
What is the severity of CVE-2024-56624?
CVE-2024-56624 is considered to have a moderate severity rating.
How do I fix CVE-2024-56624?
To fix CVE-2024-56624, update to the latest version of the Linux kernel that includes the necessary patches.
What systems are affected by CVE-2024-56624?
CVE-2024-56624 affects various versions of the Linux kernel, specifically those that utilize the iommufd subsystem.
Does CVE-2024-56624 allow for exploitation?
CVE-2024-56624 does not directly allow for exploitation but can lead to potential instability in the affected kernel version.
Is there a workaround for CVE-2024-56624?
Currently, there is no established workaround for CVE-2024-56624 other than applying the kernel patch.