Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2024-41012

published high CVSS 3.1 · 7.8

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

Published
23 Jul 2024, 08:06:02 UTC
Updated
05 Aug 2026, 11:34:38 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linuxc293621bbf678a3d85e3ed721c3921c8a670610d to < d30ff33040834c3b9eee29740acd92f9c7ba2250 · c293621bbf678a3d85e3ed721c3921c8a670610d to < dc2ce1dfceaa0767211a9d963ddb029ab21c4235 · c293621bbf678a3d85e3ed721c3921c8a670610d to < 5661b9c7ec189406c2dde00837aaa4672efb6240 · c293621bbf678a3d85e3ed721c3921c8a670610d to < 52c87ab18c76c14d7209646ccb3283b3f5d87b22 · c293621bbf678a3d85e3ed721c3921c8a670610d to < ef8fc41cd6f95f9a4a3470f085aecf350569a0b3 · c293621bbf678a3d85e3ed721c3921c8a670610d to < 5f5d0799eb0a01d550c21b7894e26b2d9db55763 · c293621bbf678a3d85e3ed721c3921c8a670610d to < b6d223942c34057fdfd8f149e763fa823731b224 · c293621bbf678a3d85e3ed721c3921c8a670610d to < 3cad1bc010416c6dd780643476bc59ed742436b9 · Other versions: unaffected Affected Not stated Linux
Linux — Linux2.6.13 (affected) · 0 to < 2.6.13 (unaffected · semver) · 4.19.319 through 4.19.* (unaffected · semver) · 5.4.281 through 5.4.* (unaffected · semver) · 5.10.223 through 5.10.* (unaffected · semver) · 5.15.164 through 5.15.* (unaffected · semver) · 6.1.101 through 6.1.* (unaffected · semver) · 6.6.42 through 6.6.* (unaffected · semver) · 6.9.9 through 6.9.* (unaffected · semver) · 6.10 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluationALAS2-2025-2778 Fixed Not stated Amazon Linux assessment
Amazon Linux AL2 Release evaluationALAS2KERNEL-5.10-2024-066 Fixed Not stated Amazon Linux assessment
Amazon Linux AL2 Release evaluationALAS2KERNEL-5.15-2024-050 Fixed Not stated Amazon Linux assessment
Amazon Linux AL2 Release evaluationALAS2KERNEL-5.4-2024-080 Fixed Not stated Amazon Linux assessment
AlmaLinux 8 bpftool Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
Debian bullseye linux Advisory build 5.10.223-1 DSA-5747-1
Show 100 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluationALAS2023-2024-679 Fixed Not stated Amazon Linux assessment
Oracle Linux 7 kernel-uekaarch64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
AlmaLinux 8 kernel Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-abi-stablelists Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-core Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-cross-headers Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-debug Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-debug-core Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-debug-devel Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-debug-modules Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-debug-modules-extra Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-devel Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-doc Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-headers Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-modules Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-modules-extra Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-rt Advisory build 4.18.0-553.22.1.rt7.363.el8_10 ALSA-2024:7001
AlmaLinux 8 kernel-rt-core Advisory build 4.18.0-553.22.1.rt7.363.el8_10 ALSA-2024:7001
AlmaLinux 8 kernel-rt-debug Advisory build 4.18.0-553.22.1.rt7.363.el8_10 ALSA-2024:7001
AlmaLinux 8 kernel-rt-debug-core Advisory build 4.18.0-553.22.1.rt7.363.el8_10 ALSA-2024:7001
AlmaLinux 8 kernel-rt-debug-devel Advisory build 4.18.0-553.22.1.rt7.363.el8_10 ALSA-2024:7001
AlmaLinux 8 kernel-rt-debug-kvm Advisory build 4.18.0-553.22.1.rt7.363.el8_10 ALSA-2024:7001
AlmaLinux 8 kernel-rt-debug-modules Advisory build 4.18.0-553.22.1.rt7.363.el8_10 ALSA-2024:7001
AlmaLinux 8 kernel-rt-debug-modules-extra Advisory build 4.18.0-553.22.1.rt7.363.el8_10 ALSA-2024:7001
AlmaLinux 8 kernel-rt-devel Advisory build 4.18.0-553.22.1.rt7.363.el8_10 ALSA-2024:7001
AlmaLinux 8 kernel-rt-kvm Advisory build 4.18.0-553.22.1.rt7.363.el8_10 ALSA-2024:7001
AlmaLinux 8 kernel-rt-modules Advisory build 4.18.0-553.22.1.rt7.363.el8_10 ALSA-2024:7001
AlmaLinux 8 kernel-rt-modules-extra Advisory build 4.18.0-553.22.1.rt7.363.el8_10 ALSA-2024:7001
AlmaLinux 8 kernel-tools Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-tools-libs Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-tools-libs-devel Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-zfcpdump Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-zfcpdump-core Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-zfcpdump-devel Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-zfcpdump-modules Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 kernel-zfcpdump-modules-extra Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 perf Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
AlmaLinux 8 python3-perf Advisory build 4.18.0-553.22.1.el8_10 ALSA-2024:7000
Debian bullseye linux-6.1 Advisory build 6.1.119-1~deb11u1 DLA-4008-1
Oracle Linux 7 kernel-uekaarch64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uekx86_64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 kernel-uekx86_64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uek-containerx86_64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12782
Oracle Linux 7 kernel-uek-container-debugx86_64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12782
Oracle Linux 7 kernel-uek-debugaarch64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 kernel-uek-debugaarch64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uek-debugx86_64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 kernel-uek-debugx86_64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uek-debug-develaarch64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 kernel-uek-debug-develaarch64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uek-debug-develx86_64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 kernel-uek-debug-develx86_64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uek-develaarch64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 kernel-uek-develaarch64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uek-develx86_64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 kernel-uek-develx86_64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uek-docaarch64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uek-docx86_64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 kernel-uek-docx86_64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uek-headersaarch64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 kernel-uek-toolsaarch64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 kernel-uek-toolsaarch64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uek-toolsx86_64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 kernel-uek-toolsx86_64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uek-tools-libsaarch64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 kernel-uek-tools-libsaarch64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 kernel-uek-tools-libs-develaarch64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 perfaarch64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 perfaarch64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 7 python-perfaarch64 Advisory build 0:4.14.35-2047.542.2.el7uek ELSA-2024-12814
Oracle Linux 7 python-perfaarch64 Advisory build 0:5.4.17-2136.336.5.1.el7uek ELSA-2024-12780
Oracle Linux 8 bpftoolaarch64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 bpftoolaarch64 Advisory build 0:5.15.0-302.167.6.el8uek ELSA-2024-12815
Oracle Linux 8 bpftoolx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 bpftoolx86_64 Advisory build 0:5.15.0-302.167.6.el8uek ELSA-2024-12815
Oracle Linux 8 kernelx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-abi-stablelistsx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-corex86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-cross-headersaarch64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-cross-headersx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-debugx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-debug-corex86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-debug-develx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-debug-modulesx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-debug-modules-extrax86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-develx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-docx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-headersaarch64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-headersx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-modulesx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-modules-extrax86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-toolsaarch64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-toolsx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-tools-libsaarch64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-tools-libsx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-tools-libs-develaarch64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-tools-libs-develx86_64 Advisory build 0:4.18.0-553.22.1.el8_10 ELSA-2024-7000
Oracle Linux 8 kernel-uekaarch64 Advisory build 0:5.15.0-302.167.6.el8uek ELSA-2024-12815
Oracle Linux 8 kernel-uekaarch64 Advisory build 0:5.4.17-2136.336.5.1.el8uek ELSA-2024-12780

Package entries are limited to the first 100 builds and 100 linked advisories.

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().

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

83

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The vulnerability is reached only through the local `fcntl(F_SETLK/F_SETLKW)` syscall path in `fcntl_setlk()`, with the resulting use-after-free read triggered by reading the local `/proc/locks` file. Network file-lock consumers (nfsd, lockd, ksmbd) call `vfs_lock_file()` directly and never traverse the buggy recovery branch. AC:L - The attacker controls both sides of the fcntl/close race and can make it fully deterministic by blocking a second thread in `F_SETLKW` behind a conflicting lock it owns, closing the fd, then releasing the blocker. The failure of the recovery unlock is likewise attacker-inducible, either via an LSM policy asymmetry or by forcing the `GFP_KERNEL` allocation failure in the mid-range split path under attacker-generated memory pressure. PR:L - Any unprivileged local user can call `fcntl()` on a file it can open and read the world-readable `/proc/locks` (confirmed mode `-r--r--r--`); no capability, user-namespace, or mount privilege is checked anywhere along the path. UI:N - The attacker performs every step itself — creating the lock, racing the close, and reading `/proc/locks` — with no action required from any other user or process. S:U - The dangling `file_lock` and the resulting reads stay within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed. C:H - `lock_get_status()` dereferences the freed `struct file` (`flc->flc_file->f_inode`) and prints `inode->i_sb->s_dev` and `inode->i_ino` to userspace, giving a chosen-address read primitive once the freed slot is groomed — the fix author states this "can likely be used to read arbitrary kernel memory." I:H - The use-after-free leaves permanently corrupted kernel lock state — a `file_lock` with dangling `flc_file` and `flc_owner` that can never be released, so a recycled `files_struct` at the same address grants an unrelated (possibly higher-privileged) process spurious ownership of the stale lock. Combined with the arbitrary-read primitive that defeats KASLR and exposes credentials/keys, the condition is leverageable toward privilege escalation. A:H - Reading `/proc/locks` after the freed page is reclaimed oopses the kernel, and the pre-fix `WARN_ON_ONCE()` panics outright on the `panic_on_warn` configurations common in hardened and Android deployments. The permanently un-releasable stale lock also blocks any other process waiting via `F_SETLKW` on that inode indefinitely.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux c293621bbf678a3d85e3ed721c3921c8a670610d to < d30ff33040834c3b9eee29740acd92f9c7ba2250 (affected · git)c293621bbf678a3d85e3ed721c3921c8a670610d to < dc2ce1dfceaa0767211a9d963ddb029ab21c4235 (affected · git)c293621bbf678a3d85e3ed721c3921c8a670610d to < 5661b9c7ec189406c2dde00837aaa4672efb6240 (affected · git)c293621bbf678a3d85e3ed721c3921c8a670610d to < 52c87ab18c76c14d7209646ccb3283b3f5d87b22 (affected · git)c293621bbf678a3d85e3ed721c3921c8a670610d to < ef8fc41cd6f95f9a4a3470f085aecf350569a0b3 (affected · git)c293621bbf678a3d85e3ed721c3921c8a670610d to < 5f5d0799eb0a01d550c21b7894e26b2d9db55763 (affected · git)c293621bbf678a3d85e3ed721c3921c8a670610d to < b6d223942c34057fdfd8f149e763fa823731b224 (affected · git)c293621bbf678a3d85e3ed721c3921c8a670610d to < 3cad1bc010416c6dd780643476bc59ed742436b9 (affected · git)Default: unaffected Linux · cna
Linux Linux 2.6.13 (affected)0 to < 2.6.13 (unaffected · semver)4.19.319 through 4.19.* (unaffected · semver)5.4.281 through 5.4.* (unaffected · semver)5.10.223 through 5.10.* (unaffected · semver)5.15.164 through 5.15.* (unaffected · semver)6.1.101 through 6.1.* (unaffected · semver)6.6.42 through 6.6.* (unaffected · semver)6.9.9 through 6.9.* (unaffected · semver)6.10 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

9

Provider assertions

3

Linux · cna

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

CISA-ADP · adp

CISA ADP Vulnrichment

CVE · adp

CVE Program Container

Provenance

Schema
5.2
Searchable
yes
Content hash
02f5914b1a32943c6b1912906965f9b9058232716f97b2c1d322f4932dfb835d
Ingested
23 Sep 2026, 08:26:02 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected