Menu

Star on GitHub · 3.2k

CVE-2024-41012

7.8 · HIGH

In the Linux kernel, the following vulnerability has been resolved: filelock: Remove locks reliably when fcntl/close race is detected When fcntl_setlk() races with close(), it removes the created…

Published Jul 23, 2024CWE-416EPSS 0.23%

Overview

CVE-2024-41012 is a high-severity vulnerability. It was published on July 23, 2024 and has a CVSS 3.1 base score of 7.8 (HIGH).

This vulnerability has a CVSS 3.1 base score of 7.8, rated HIGH. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

Technical description

In the Linux kernel, the following vulnerability has been resolved:

filelock: Remove locks reliably when fcntl/close race is detected

When fcntl_setlk() races with close(), it removes the created lock with

do_lock_file_wait().

However, LSMs can allow the first do_lock_file_wait() that created the lock

while denying the second do_lock_file_wait() that tries to remove the lock.

Separately, posix_lock_file() could also fail to

remove a lock due to GFP_KERNEL allocation failure (when splitting a range

in the middle).

After the bug has been triggered, use-after-free reads will occur in

lock_get_status() 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 locks_remove_posix() instead, which is designed to

reliably get rid of POSIX locks associated with the given file and

files_struct and is also used by filp_flush().

Remediation

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Frequently asked questions

What is CVE-2024-41012?

CVE-2024-41012 is a high-severity vulnerability. It was published on July 23, 2024 and has a CVSS 3.1 base score of 7.8 (HIGH).

How severe is CVE-2024-41012?

This vulnerability has a CVSS 3.1 base score of 7.8, rated HIGH. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2024-41012?

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2024-41012?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2024-41012 is actually reachable in your own applications and APIs, then verifies each finding before reporting it. That tells you if the weakness is a real, exploitable risk in your environment or a false positive you can safely deprioritize.

Related HIGH CVEs from 2024

View all