{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2024-39494", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2024-06-25T14:23:23.748Z", "datePublished": "2024-07-12T12:20:30.348Z", "dateUpdated": "2026-08-05T11:33:43.864Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:33:43.864Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nima: Fix use-after-free on a dentry's dname.name\n\n->d_name.name can change on rename and the earlier value can be freed;\nthere are conditions sufficient to stabilize it (->d_lock on dentry,\n->d_lock on its parent, ->i_rwsem exclusive on the parent's inode,\nrename_lock), but none of those are met at any of the sites. Take a stable\nsnapshot of the name instead." } ], "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 sites are reached through `security_file_post_open`/`bprm_check_security`/`mmap_file` from ordinary `open(2)`, `execve(2)` and `mmap(PROT_EXEC)` syscalls, and the racing free comes from a local `rename(2)`; no remote peer data is parsed by the affected code.\nAC:L - The attacker owns both sides of the race — one thread execs/opens the file to start measurement, another renames it — and the window is enormous: `ima_collect_measurement()` hashes the entire file between capturing and dereferencing the pointer, and `ima_eventname_init_common()` has a sleeping `kzalloc(GFP_KERNEL)` between its `strlen()` and `memcpy()`, both far exceeding the RCU grace period that `kfree_rcu()` waits for. CONFIG_IMA with a measurement policy is standard on distro, attestation and secure-boot systems, and the sequence can be looped indefinitely.\nPR:L - Any unprivileged local user can trigger it by exec'ing or opening a file it owns (builtin `tcb` policy measures `BPRM_CHECK`/`MMAP_CHECK` for all uids, and tmpfs is only excluded for `FILE_CHECK`) while renaming that file in a directory it controls such as /tmp or $HOME. No capability, root, or user-namespace trick is required.\nUI:N - Both halves of the race are performed by the attacker's own two threads; no victim ever has to open, mount, or execute anything.\nS:U - The stale dereference reads kernel heap memory within the same kernel security authority, with no VM, IOMMU, or sandbox boundary crossed.\nC:H - The freed `external_name` is a plain `GFP_KERNEL_ACCOUNT` kmalloc object that returns to the kmalloc-cg slab and can be reclaimed by attacker-sprayed or sensitive kernel objects, and the `strlen()` over it is unbounded so the read runs past the original allocation into adjacent slab data. Those bytes are copied verbatim into the IMA measurement log exposed via securityfs and sent to remote attestation verifiers, and into audit records — bulk kernel heap disclosure.\nI:H - Attacker-chosen bytes from the reclaimed object land unescaped in the IMA measurement log (`ima_write_template_field_data()` only rewrites spaces, so injected newlines forge whole entries in the newline-delimited `ascii_runtime_measurements` stream) and are hashed into the TPM PCR, corrupting exactly the attestation and audit evidence IMA exists to produce; per use-after-free scoring, reclaim control over the freed object also supports heap-grooming toward stronger primitives.\nA:H - The unbounded `strlen()`/`memcpy()` over a freed slab object whose page may already have been released can fault on unmapped memory and oops the kernel, and the garbage length also feeds `kzalloc()` and audit-buffer sizing; on KASAN/hardened kernels the use-after-free faults immediately, and the whole sequence is repeatable at will by any local user." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "security/integrity/ima/ima_api.c", "security/integrity/ima/ima_template_lib.c" ], "versions": [ { "version": "2fe5d6def1672ae6635dd71867bf36dcfaa7434b", "lessThan": "480afcbeb7aaaa22677d3dd48ec590b441eaac1a", "status": "affected", "versionType": "git" }, { "version": "2fe5d6def1672ae6635dd71867bf36dcfaa7434b", "lessThan": "edf287bc610b18d7a9c0c0c1cb2e97b9348c71bb", "status": "affected", "versionType": "git" }, { "version": "2fe5d6def1672ae6635dd71867bf36dcfaa7434b", "lessThan": "0b31e28fbd773aefb6164687e0767319b8199829", "status": "affected", "versionType": "git" }, { "version": "2fe5d6def1672ae6635dd71867bf36dcfaa7434b", "lessThan": "7fb374981e31c193b1152ed8d3b0a95b671330d4", "status": "affected", "versionType": "git" }, { "version": "2fe5d6def1672ae6635dd71867bf36dcfaa7434b", "lessThan": "dd431c3ac1fc34a9268580dd59ad3e3c76b32a8c", "status": "affected", "versionType": "git" }, { "version": "2fe5d6def1672ae6635dd71867bf36dcfaa7434b", "lessThan": "a78a6f0da57d058e2009e9958fdcef66f165208c", "status": "affected", "versionType": "git" }, { "version": "2fe5d6def1672ae6635dd71867bf36dcfaa7434b", "lessThan": "be84f32bb2c981ca670922e047cdde1488b233de", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "security/integrity/ima/ima_api.c", "security/integrity/ima/ima_template_lib.c" ], "versions": [ { "version": "3.7", "status": "affected" }, { "version": "0", "lessThan": "3.7", "status": "unaffected", "versionType": "semver" }, { "version": "5.4.291", "lessThanOrEqual": "5.4.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.10.235", "lessThanOrEqual": "5.10.*", "status": "unaffected", "versionType": "semver" }, { "version": "5.15.174", "lessThanOrEqual": "5.15.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.97", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.35", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.9.6", "lessThanOrEqual": "6.9.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.10", "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": "3.7", "versionEndExcluding": "5.4.291" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.7", "versionEndExcluding": "5.10.235" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.7", "versionEndExcluding": "5.15.174" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.7", "versionEndExcluding": "6.1.97" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.7", "versionEndExcluding": "6.6.35" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.7", "versionEndExcluding": "6.9.6" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.7", "versionEndExcluding": "6.10" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/480afcbeb7aaaa22677d3dd48ec590b441eaac1a" }, { "url": "https://git.kernel.org/stable/c/edf287bc610b18d7a9c0c0c1cb2e97b9348c71bb" }, { "url": "https://git.kernel.org/stable/c/0b31e28fbd773aefb6164687e0767319b8199829" }, { "url": "https://git.kernel.org/stable/c/7fb374981e31c193b1152ed8d3b0a95b671330d4" }, { "url": "https://git.kernel.org/stable/c/dd431c3ac1fc34a9268580dd59ad3e3c76b32a8c" }, { "url": "https://git.kernel.org/stable/c/a78a6f0da57d058e2009e9958fdcef66f165208c" }, { "url": "https://git.kernel.org/stable/c/be84f32bb2c981ca670922e047cdde1488b233de" } ], "title": "ima: Fix use-after-free on a dentry's dname.name", "x_generator": { "engine": "bippy-1.2.0" } }, "adp": [ { "title": "CVE Program Container", "references": [ { "url": "https://git.kernel.org/stable/c/7fb374981e31c193b1152ed8d3b0a95b671330d4", "tags": [ "x_transferred" ] }, { "url": "https://git.kernel.org/stable/c/dd431c3ac1fc34a9268580dd59ad3e3c76b32a8c", "tags": [ "x_transferred" ] }, { "url": "https://git.kernel.org/stable/c/a78a6f0da57d058e2009e9958fdcef66f165208c", "tags": [ "x_transferred" ] }, { "url": "https://git.kernel.org/stable/c/be84f32bb2c981ca670922e047cdde1488b233de", "tags": [ "x_transferred" ] }, { "url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html" }, { "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:56:11.179Z" } }, { "metrics": [ { "other": { "type": "ssvc", "content": { "id": "CVE-2024-39494", "role": "CISA Coordinator", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "version": "2.0.3", "timestamp": "2024-09-10T17:07:29.508967Z" } } } ], "title": "CISA ADP Vulnrichment", "providerMetadata": { "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP", "dateUpdated": "2024-09-11T17:34:39.893Z" } } ] } }