{"api_version":"1","generated_at":"2026-12-01T14:33:27+00:00","cve":"CVE-2024-56549","urls":{"html":"https://cve.report/CVE-2024-56549","api":"https://cve.report/api/cve/CVE-2024-56549.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2024-56549","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-56549"},"summary":{"title":"cachefiles: Fix NULL pointer dereference in object->file","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncachefiles: Fix NULL pointer dereference in object->file\n\nAt present, the object->file has the NULL pointer dereference problem in\nondemand-mode. The root cause is that the allocated fd and object->file\nlifetime are inconsistent, and the user-space invocation to anon_fd uses\nobject->file. Following is the process that triggers the issue:\n\n\t  [write fd]\t\t\t\t[umount]\ncachefiles_ondemand_fd_write_iter\n\t\t\t\t       fscache_cookie_state_machine\n\t\t\t\t\t cachefiles_withdraw_cookie\n  if (!file) return -ENOBUFS\n\t\t\t\t\t   cachefiles_clean_up_object\n\t\t\t\t\t     cachefiles_unmark_inode_in_use\n\t\t\t\t\t     fput(object->file)\n\t\t\t\t\t     object->file = NULL\n  // file NULL pointer dereference!\n  __cachefiles_write(..., file, ...)\n\nFix this issue by add an additional reference count to the object->file\nbefore write/llseek, and decrement after it finished.","state":"PUBLISHED","assigner":"Linux","published_at":"2024-12-27 14:15:34","updated_at":"2026-10-15 22:18:01"},"problem_types":["CWE-476"],"metrics":[{"version":"3.1","source":"nvd@nist.gov","type":"Primary","score":"5.5","severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"}},{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"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","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/31ad74b20227ce6b40910ff78b1c604e42975cf1","name":"https://git.kernel.org/stable/c/31ad74b20227ce6b40910ff78b1c604e42975cf1","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d6bba3ece960129a553d4b16f1b00c884dc0993a","name":"https://git.kernel.org/stable/c/d6bba3ece960129a553d4b16f1b00c884dc0993a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/785408bbafcfa24c9fc5b251f03fd0780ce182bd","name":"https://git.kernel.org/stable/c/785408bbafcfa24c9fc5b251f03fd0780ce182bd","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9582c7664103c9043e80a78f5c382aa6bdd67418","name":"https://git.kernel.org/stable/c/9582c7664103c9043e80a78f5c382aa6bdd67418","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html","name":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/f98770440c9bc468e2fd878212ec9526dbe08293","name":"https://git.kernel.org/stable/c/f98770440c9bc468e2fd878212ec9526dbe08293","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-56549","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56549","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c8383054506c77b814489c09877b5db83fd4abf2 d6bba3ece960129a553d4b16f1b00c884dc0993a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c8383054506c77b814489c09877b5db83fd4abf2 785408bbafcfa24c9fc5b251f03fd0780ce182bd git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c8383054506c77b814489c09877b5db83fd4abf2 f98770440c9bc468e2fd878212ec9526dbe08293 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c8383054506c77b814489c09877b5db83fd4abf2 9582c7664103c9043e80a78f5c382aa6bdd67418 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c8383054506c77b814489c09877b5db83fd4abf2 31ad74b20227ce6b40910ff78b1c604e42975cf1 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.19","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.19 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.129 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.78 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.11.11 6.11.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.2 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.13 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2024","cve_id":"56549","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"linux","cpe5":"linux_kernel","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"providerMetadata":{"dateUpdated":"2025-11-03T19:32:24.323Z","orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE"},"references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html"}],"title":"CVE Program Container"},{"metrics":[{"other":{"content":{"id":"CVE-2024-56549","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","timestamp":"2026-10-15T21:41:03.958345Z","version":"2.0.3"},"type":"ssvc"}}],"providerMetadata":{"dateUpdated":"2026-10-15T21:41:47.066Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"title":"CISA ADP Vulnrichment"}],"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/cachefiles/interface.c","fs/cachefiles/ondemand.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"d6bba3ece960129a553d4b16f1b00c884dc0993a","status":"affected","version":"c8383054506c77b814489c09877b5db83fd4abf2","versionType":"git"},{"lessThan":"785408bbafcfa24c9fc5b251f03fd0780ce182bd","status":"affected","version":"c8383054506c77b814489c09877b5db83fd4abf2","versionType":"git"},{"lessThan":"f98770440c9bc468e2fd878212ec9526dbe08293","status":"affected","version":"c8383054506c77b814489c09877b5db83fd4abf2","versionType":"git"},{"lessThan":"9582c7664103c9043e80a78f5c382aa6bdd67418","status":"affected","version":"c8383054506c77b814489c09877b5db83fd4abf2","versionType":"git"},{"lessThan":"31ad74b20227ce6b40910ff78b1c604e42975cf1","status":"affected","version":"c8383054506c77b814489c09877b5db83fd4abf2","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/cachefiles/interface.c","fs/cachefiles/ondemand.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.19"},{"lessThan":"5.19","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.129","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.78","versionType":"semver"},{"lessThanOrEqual":"6.11.*","status":"unaffected","version":"6.11.11","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.2","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"6.13","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.129","versionStartIncluding":"5.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.78","versionStartIncluding":"5.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.11.11","versionStartIncluding":"5.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.2","versionStartIncluding":"5.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.13","versionStartIncluding":"5.19","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncachefiles: Fix NULL pointer dereference in object->file\n\nAt present, the object->file has the NULL pointer dereference problem in\nondemand-mode. The root cause is that the allocated fd and object->file\nlifetime are inconsistent, and the user-space invocation to anon_fd uses\nobject->file. Following is the process that triggers the issue:\n\n\t  [write fd]\t\t\t\t[umount]\ncachefiles_ondemand_fd_write_iter\n\t\t\t\t       fscache_cookie_state_machine\n\t\t\t\t\t cachefiles_withdraw_cookie\n  if (!file) return -ENOBUFS\n\t\t\t\t\t   cachefiles_clean_up_object\n\t\t\t\t\t     cachefiles_unmark_inode_in_use\n\t\t\t\t\t     fput(object->file)\n\t\t\t\t\t     object->file = NULL\n  // file NULL pointer dereference!\n  __cachefiles_write(..., file, ...)\n\nFix this issue by add an additional reference count to the object->file\nbefore write/llseek, and decrement after it finished."}],"metrics":[{"cvssV3_1":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is reached through local file-descriptor operations (write()/lseek() on a cachefiles on-demand anon fd) raced against local cookie withdrawal (umount, LRU discard, invalidation). There is no remote or adjacent-network path into fs/cachefiles/ondemand.c.\nAC:L - The attacker controls both sides of the race — they generate the demand-read traffic that makes the daemon write on the anon fd, and they trigger the withdrawal (umount of their erofs-on-fscache mount, or letting the cookie idle past the ~2s LRU timeout) — and can retry the sequence indefinitely until the window is hit.\nPR:L - Although /dev/cachefiles itself requires CAP_SYS_ADMIN, an unprivileged local user of an on-demand erofs/fscache mount (e.g. inside a container using an on-demand image) drives both the daemon's writes and the cookie withdrawal without ever needing the anon fd, so basic unprivileged local access suffices.\nUI:N - No victim action is needed; the cachefiles daemon services demand-read requests automatically as part of normal operation, and the withdrawal path is driven by the attacker's own filesystem activity.\nS:U - The corruption is confined to kernel memory within the same security authority; this is standard kernel memory corruption, not a hypervisor, IOMMU, or sandbox boundary crossing.\nC:H - The use-after-free on struct file lets llseek/SEEK_DATA/SEEK_HOLE and DIO operations act on a freed slot that filp_cachep (SLAB_TYPESAFE_BY_RCU) hands out as an unrelated struct file, exposing freed-memory contents and redirecting reads to files the attacker has no access to.\nI:H - __cachefiles_write() calls get_file() and vfs_iocb_iter_write() on the dangling pointer, inflating a reallocated file's refcount (setting up a further UAF) and writing attacker-influenced cache data — plus fallocate() — into an unrelated open file, giving a controlled write primitive.\nA:H - Dereferencing the freed/NULLed object->file causes a kernel oops or panic, and the refcount corruption on the reallocated struct file leads to further fatal memory corruption."}]}],"providerMetadata":{"dateUpdated":"2026-08-05T11:44:58.475Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/d6bba3ece960129a553d4b16f1b00c884dc0993a"},{"url":"https://git.kernel.org/stable/c/785408bbafcfa24c9fc5b251f03fd0780ce182bd"},{"url":"https://git.kernel.org/stable/c/f98770440c9bc468e2fd878212ec9526dbe08293"},{"url":"https://git.kernel.org/stable/c/9582c7664103c9043e80a78f5c382aa6bdd67418"},{"url":"https://git.kernel.org/stable/c/31ad74b20227ce6b40910ff78b1c604e42975cf1"}],"title":"cachefiles: Fix NULL pointer dereference in object->file","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2024-56549","datePublished":"2024-12-27T14:11:30.336Z","dateReserved":"2024-12-27T14:03:05.989Z","dateUpdated":"2026-10-15T21:41:47.066Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2024-12-27 14:15:34","lastModifiedDate":"2026-10-15 22:18:01","problem_types":["CWE-476"],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"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","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9},{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","baseScore":5.5,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":3.6}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-10-15T21:41:03.958345Z","id":"CVE-2024-56549","options":[{"exploitation":"none"},{"automatable":"no"},{"technicalImpact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.11.11","matchCriteriaId":"A482F6D5-4DB0-4611-AF23-1D568CE9F2BF"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12","versionEndExcluding":"6.12.2","matchCriteriaId":"D8882B1B-2ABC-4838-AC1D-DBDBB5764776"}]}]}]},"legacy_mitre":{"record":{"CveYear":"2024","CveId":"56549","Ordinal":"1","Title":"cachefiles: Fix NULL pointer dereference in object->file","CVE":"CVE-2024-56549","Year":"2024"},"notes":[{"CveYear":"2024","CveId":"56549","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\ncachefiles: Fix NULL pointer dereference in object->file\n\nAt present, the object->file has the NULL pointer dereference problem in\nondemand-mode. The root cause is that the allocated fd and object->file\nlifetime are inconsistent, and the user-space invocation to anon_fd uses\nobject->file. Following is the process that triggers the issue:\n\n\t  [write fd]\t\t\t\t[umount]\ncachefiles_ondemand_fd_write_iter\n\t\t\t\t       fscache_cookie_state_machine\n\t\t\t\t\t cachefiles_withdraw_cookie\n  if (!file) return -ENOBUFS\n\t\t\t\t\t   cachefiles_clean_up_object\n\t\t\t\t\t     cachefiles_unmark_inode_in_use\n\t\t\t\t\t     fput(object->file)\n\t\t\t\t\t     object->file = NULL\n  // file NULL pointer dereference!\n  __cachefiles_write(..., file, ...)\n\nFix this issue by add an additional reference count to the object->file\nbefore write/llseek, and decrement after it finished.","Type":"Description","Title":"cachefiles: Fix NULL pointer dereference in object->file"}]}}}