{"id":"CVE-2024-56549","aliases":["CVE-2024-56549"],"related":[],"kind":"vulnerability","state":"published","title":"cachefiles: Fix NULL pointer dereference in object->file","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: cachefiles: Arreglar la desreferencia de puntero NULL en object-&gt;file En la actualidad, object-&gt;file tiene el problema de desreferencia de puntero NULL en el modo ondemand. La causa raíz es que el fd asignado y el tiempo de vida de object-&gt;file son inconsistentes, y la invocación del espacio de usuario a anon_fd usa object-&gt;file. A continuación, se muestra el proceso que desencadena el problema: [write fd] [umount] cachefiles_ondemand_fd_write_iter fscache_cookie_state_machine cachefiles_withdraw_cookie if (!file) return -ENOBUFS cachefiles_clean_up_object cachefiles_unmark_inode_in_use fput(object-&gt;file) object-&gt;file = NULL // file ¡Desreferencia de puntero NULL! __cachefiles_write(..., file, ...) Solucione este problema agregando un recuento de referencia adicional al objeto-&gt;archivo antes de escribir/llseek, y disminuya después de que finalice.","source":"nvd"}],"published":"2024-12-27T14:11:30.336Z","modified":"2026-10-15T22:18:01.500Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"c8383054506c77b814489c09877b5db83fd4abf2","fixed":"d6bba3ece960129a553d4b16f1b00c884dc0993a","status":"affected"},{"type":"git","introduced":"c8383054506c77b814489c09877b5db83fd4abf2","fixed":"785408bbafcfa24c9fc5b251f03fd0780ce182bd","status":"affected"},{"type":"git","introduced":"c8383054506c77b814489c09877b5db83fd4abf2","fixed":"f98770440c9bc468e2fd878212ec9526dbe08293","status":"affected"},{"type":"git","introduced":"c8383054506c77b814489c09877b5db83fd4abf2","fixed":"9582c7664103c9043e80a78f5c382aa6bdd67418","status":"affected"},{"type":"git","introduced":"c8383054506c77b814489c09877b5db83fd4abf2","fixed":"31ad74b20227ce6b40910ff78b1c604e42975cf1","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.19","status":"unaffected"},{"type":"semver","introduced":"6.1.129","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.78","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.11.11","lastAffected":"6.11.*","status":"unaffected"},{"type":"semver","introduced":"6.12.2","lastAffected":"6.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.19","fixed":"6.11.11"},{"status":"affected","introduced":"6.12","fixed":"6.12.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/d6bba3ece960129a553d4b16f1b00c884dc0993a","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/785408bbafcfa24c9fc5b251f03fd0780ce182bd","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f98770440c9bc468e2fd878212ec9526dbe08293","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9582c7664103c9043e80a78f5c382aa6bdd67418","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/31ad74b20227ce6b40910ff78b1c604e42975cf1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-15T21:41:03.958Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-56549","url":"https://www.cve.org/CVERecord?id=CVE-2024-56549","licence":"CVE Terms of Use","modified":"2026-10-15T21:41:47.066Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-56549","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-56549","licence":"Public domain","modified":"2026-10-15T22:18:01.500Z"}],"updatedAt":"2026-11-25T22:58:50.444Z","epss":{"score":0.00231,"percentile":0.14915,"date":"2026-12-02T12:00:21.000Z"}}