CVE-2024-41012: filelock: Remove locks reliably when fcntl/close race is detected

Published Jul 23, 2024
·
Updated

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

21 affected componentsFixes available
redhat/kernel<6.9.9
6.9.9
redhat/kernel<6.10
6.10
Linux Linux kernel>=2.6.13<4.19.319
Linux Linux kernel>=4.20<5.4.281
Linux Linux kernel>=5.5<5.10.223
Linux Linux kernel>=5.11<5.15.164
Linux Linux kernel>=5.16<6.1.101
Linux Linux kernel>=6.2<6.6.42
Linux Linux kernel>=6.7<6.9.9
Linux Linux kernel=6.10-rc1
Linux Linux kernel=6.10-rc2
Linux Linux kernel=6.10-rc3
Linux Linux kernel=6.10-rc4
Linux Linux kernel=6.10-rc5
Linux Linux kernel=6.10-rc6
IBM Security Verify Governance<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Software Stack<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Virtual Appliance<=ISVG 10.0.2
IBM Security Verify Governance Identity Manager Container<=ISVG 10.0.2
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1

Event History

Jul 23, 2024
CVE Published
via MITRE·08:06 AM
Data Sourced
via MITRE·08:06 AM
Description
Data Sourced
via NVD·08:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
May 1, 2025
Data Sourced
via Ubuntu·12:32 AM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-41012?

CVE-2024-41012 has been classified as a high-severity vulnerability in the Linux kernel.

2

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.

3

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.

4

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.

5

Is there a known exploit for CVE-2024-41012?

As of now, there are no publicly available exploits specifically targeting CVE-2024-41012.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203