CVE-2024-41012: filelock: Remove locks reliably when fcntl/close race is detected
In the Linux kernel, the following vulnerability has been resolved:
filelock: Remove locks reliably when fcntl/close race is detected
The Linux kernel CVE team has assigned CVE-2024-41012 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024072314-CVE-2024-41012-a1cf@gregkh/T
Other sources
In the Linux kernel, the following vulnerability has been resolved:
filelock: Remove locks reliably when fcntl/close race is detected
When fcntlsetlk() races with close(), it removes the created lock with dolockfilewait(). However, LSMs can allow the first dolockfilewait() that created the lock while denying the second dolockfilewait() that tries to remove the lock. Separately, posixlockfile() could also fail to remove a lock due to GFPKERNEL allocation failure (when splitting a range in the middle).
After the bug has been triggered, use-after-free reads will occur in lockgetstatus() when userspace reads /proc/locks. This can likely be used to read arbitrary kernel memory, but can't corrupt kernel memory.
Fix it by calling locksremoveposix() instead, which is designed to reliably get rid of POSIX locks associated with the given file and filesstruct and is also used by filpflush().
— NVD
Linux Kernel is vulnerable to a denial of service, caused by improper locking flaw when fcntl/close race is detected. By sending a specially crafted request, a local authenticated attacker could exploit this vulnerability to cause a denial of service condition.
— IBM
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-41012?
CVE-2024-41012 has been classified as a high-severity vulnerability in the Linux kernel.
How do I fix CVE-2024-41012?
To mitigate CVE-2024-41012, upgrade to Linux kernel versions 6.9.9, 6.10, or any aforementioned patched versions.
What systems are affected by CVE-2024-41012?
CVE-2024-41012 affects various versions of the Linux kernel ranging from 2.6.13 up to 6.9.9.
What impact does CVE-2024-41012 have on Linux systems?
CVE-2024-41012 can lead to unreliable lock removal, potentially impacting system stability and security.
Is there a known exploit for CVE-2024-41012?
As of now, there are no publicly available exploits specifically targeting CVE-2024-41012.