{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-41020","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-07-12T12:17:45.613Z","datePublished":"2024-07-29T13:34:21.617Z","dateUpdated":"2026-08-05T11:34:46.395Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:34:46.395Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nfilelock: Fix fcntl/close race recovery compat path\n\nWhen I wrote commit 3cad1bc01041 (\"filelock: Remove locks reliably when\nfcntl/close race is detected\"), I missed that there are two copies of the\ncode I was patching: The normal version, and the version for 64-bit offsets\non 32-bit kernels.\nThanks to Greg KH for stumbling over this while doing the stable\nbackport...\n\nApply exactly the same fix to the compat path for 32-bit kernels."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is reached only through the local `fcntl64(F_SETLK64/F_SETLKW64)` syscall racing a local `close()`; there is no remote or adjacent-network entry point into `fcntl_setlk64()`.\nAC:L - The attacker owns both sides of the race (one thread calling fcntl64, another calling close on the same fd) and can retry indefinitely, needing only one win to plant a permanent stale lock; the extra condition that makes the recovery unlock fail is also attacker-driven (concurrent relabel under SELinux/Smack enforcing, a killable signal during `nfs_iocounter_wait()` on an NFS mount, or a co-thread creating the merged range that forces an allocating split).\nPR:L - Any unprivileged local user can call fcntl64/close on a file it may open, and can read the world-readable `/proc/locks` to drive the use-after-free; no capability, LSM privilege, or namespace access is required.\nUI:N - The attacker performs every step itself — planting the stale lock and reading `/proc/locks` — with no victim action needed; unrelated tooling (`lslocks`, `lsof`, systemd, monitoring agents) reading `/proc/locks` merely widens the blast radius.\nS:U - The dangling `file_lock` and the resulting reads stay within the kernel's own security authority; no VM, IOMMU, or hypervisor boundary is crossed.\nC:H - After the leak, `lock_get_status()` dereferences the freed `struct file` and then the pointer it yields, printing `s_dev` and `i_ino` from attacker-groomed memory to userspace — a repeatable arbitrary kernel-memory read oracle, as the reporter states it \"can likely be used to read arbitrary kernel memory.\"\nI:H - This is a use-after-free on `flc_file`/`flc_owner`; the freed `files_struct` slot can be reoccupied by another (possibly privileged) process, which then owns and mutates the stale lock, and the attacker leaves a permanent, unremovable POSIX lock corrupting kernel-managed lock state relied on by other principals.\nA:H - Dereferencing the wild `flc_file`/`i_sb` pointers oopses inside `lock_get_status()` while `blocked_lock_lock` and `file_rwsem` are held for write, hanging or panicking the entire system, and the stale lock persists so the crash is triggerable by any `/proc/locks` reader."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/locks.c"],"versions":[{"version":"c293621bbf678a3d85e3ed721c3921c8a670610d","lessThan":"a561145f3ae973ebf3e0aee41624e92a6c5cb38d","status":"affected","versionType":"git"},{"version":"c293621bbf678a3d85e3ed721c3921c8a670610d","lessThan":"4c43ad4ab41602201d34c66ac62130fe339d686f","status":"affected","versionType":"git"},{"version":"c293621bbf678a3d85e3ed721c3921c8a670610d","lessThan":"911cc83e56a2de5a40758766c6a70d6998248860","status":"affected","versionType":"git"},{"version":"c293621bbf678a3d85e3ed721c3921c8a670610d","lessThan":"53e21cfa68a7d12de378b7116c75571f73e0dfa2","status":"affected","versionType":"git"},{"version":"c293621bbf678a3d85e3ed721c3921c8a670610d","lessThan":"f4d0775c6e2f1340ca0725f0337de149aaa989ca","status":"affected","versionType":"git"},{"version":"c293621bbf678a3d85e3ed721c3921c8a670610d","lessThan":"73ae349534ebc377328e7d21891e589626c6e82c","status":"affected","versionType":"git"},{"version":"c293621bbf678a3d85e3ed721c3921c8a670610d","lessThan":"5b0af8e4c70e4b884bb94ff5f0cd49ecf1273c02","status":"affected","versionType":"git"},{"version":"c293621bbf678a3d85e3ed721c3921c8a670610d","lessThan":"ed898f9ca3fa32c56c858b463ceb9d9936cc69c4","status":"affected","versionType":"git"},{"version":"c293621bbf678a3d85e3ed721c3921c8a670610d","lessThan":"f8138f2ad2f745b9a1c696a05b749eabe44337ea","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/locks.c"],"versions":[{"version":"2.6.13","status":"affected"},{"version":"0","lessThan":"2.6.13","status":"unaffected","versionType":"semver"},{"version":"4.19.319","lessThanOrEqual":"4.19.*","status":"unaffected","versionType":"semver"},{"version":"5.4.281","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.223","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.164","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.102","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.43","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.9.12","lessThanOrEqual":"6.9.*","status":"unaffected","versionType":"semver"},{"version":"6.10.2","lessThanOrEqual":"6.10.*","status":"unaffected","versionType":"semver"},{"version":"6.11","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.13","versionEndExcluding":"4.19.319"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.13","versionEndExcluding":"5.4.281"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.13","versionEndExcluding":"5.10.223"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.13","versionEndExcluding":"5.15.164"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.13","versionEndExcluding":"6.1.102"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.13","versionEndExcluding":"6.6.43"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.13","versionEndExcluding":"6.9.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.13","versionEndExcluding":"6.10.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.13","versionEndExcluding":"6.11"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/a561145f3ae973ebf3e0aee41624e92a6c5cb38d"},{"url":"https://git.kernel.org/stable/c/4c43ad4ab41602201d34c66ac62130fe339d686f"},{"url":"https://git.kernel.org/stable/c/911cc83e56a2de5a40758766c6a70d6998248860"},{"url":"https://git.kernel.org/stable/c/53e21cfa68a7d12de378b7116c75571f73e0dfa2"},{"url":"https://git.kernel.org/stable/c/f4d0775c6e2f1340ca0725f0337de149aaa989ca"},{"url":"https://git.kernel.org/stable/c/73ae349534ebc377328e7d21891e589626c6e82c"},{"url":"https://git.kernel.org/stable/c/5b0af8e4c70e4b884bb94ff5f0cd49ecf1273c02"},{"url":"https://git.kernel.org/stable/c/ed898f9ca3fa32c56c858b463ceb9d9936cc69c4"},{"url":"https://git.kernel.org/stable/c/f8138f2ad2f745b9a1c696a05b749eabe44337ea"}],"title":"filelock: Fix fcntl/close race recovery compat path","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/a561145f3ae973ebf3e0aee41624e92a6c5cb38d","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/4c43ad4ab41602201d34c66ac62130fe339d686f","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/911cc83e56a2de5a40758766c6a70d6998248860","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/53e21cfa68a7d12de378b7116c75571f73e0dfa2","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/f4d0775c6e2f1340ca0725f0337de149aaa989ca","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/73ae349534ebc377328e7d21891e589626c6e82c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/5b0af8e4c70e4b884bb94ff5f0cd49ecf1273c02","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/ed898f9ca3fa32c56c858b463ceb9d9936cc69c4","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/f8138f2ad2f745b9a1c696a05b749eabe44337ea","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"}],"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2025-11-03T21:59:23.424Z"}},{"metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-41020","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T16:24:28.681942Z"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2024-09-11T17:34:05.238Z"}}]}}