CVE-2024-56549 (GCVE-0-2024-56549)
Vulnerability from cvelistv5
Published
2024-12-27 14:11
Modified
2026-10-15 21:41
Summary
In the Linux kernel, the following vulnerability has been resolved: cachefiles: Fix NULL pointer dereference in object->file At present, the object->file has the NULL pointer dereference problem in ondemand-mode. The root cause is that the allocated fd and object->file lifetime are inconsistent, and the user-space invocation to anon_fd uses object->file. Following is the process that triggers the issue: [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->file) object->file = NULL // file NULL pointer dereference! __cachefiles_write(..., file, ...) Fix this issue by add an additional reference count to the object->file before write/llseek, and decrement after it finished.
Impacted products
Vendor Product Version
Linux Linux Version: c8383054506c77b814489c09877b5db83fd4abf2
Version: c8383054506c77b814489c09877b5db83fd4abf2
Version: c8383054506c77b814489c09877b5db83fd4abf2
Version: c8383054506c77b814489c09877b5db83fd4abf2
Version: c8383054506c77b814489c09877b5db83fd4abf2
Create a notification for this product.
Show details on NVD website


{
  "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-\u003efile\n\nAt present, the object-\u003efile has the NULL pointer dereference problem in\nondemand-mode. The root cause is that the allocated fd and object-\u003efile\nlifetime are inconsistent, and the user-space invocation to anon_fd uses\nobject-\u003efile. 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-\u003efile)\n\t\t\t\t\t     object-\u003efile = NULL\n  // file NULL pointer dereference!\n  __cachefiles_write(..., file, ...)\n\nFix this issue by add an additional reference count to the object-\u003efile\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 \u2014 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) \u2014 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\u0027s 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\u0027s 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\u0027s refcount (setting up a further UAF) and writing attacker-influenced cache data \u2014 plus fallocate() \u2014 into an unrelated open file, giving a controlled write primitive.\nA:H - Dereferencing the freed/NULLed object-\u003efile 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-\u003efile",
      "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",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html\"}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2025-11-03T19:32:24.323Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-56549\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2026-10-15T21:41:03.958345Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2026-10-15T21:41:04.843Z\"}}], \"cna\": {\"title\": \"cachefiles: Fix NULL pointer dereference in object-\u003efile\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.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\"}, \"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 \\u2014 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) \\u2014 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\u0027s 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\u0027s 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\u0027s refcount (setting up a further UAF) and writing attacker-influenced cache data \\u2014 plus fallocate() \\u2014 into an unrelated open file, giving a controlled write primitive.\\nA:H - Dereferencing the freed/NULLed object-\u003efile causes a kernel oops or panic, and the refcount corruption on the reallocated struct file leads to further fatal memory corruption.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"c8383054506c77b814489c09877b5db83fd4abf2\", \"lessThan\": \"d6bba3ece960129a553d4b16f1b00c884dc0993a\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c8383054506c77b814489c09877b5db83fd4abf2\", \"lessThan\": \"785408bbafcfa24c9fc5b251f03fd0780ce182bd\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c8383054506c77b814489c09877b5db83fd4abf2\", \"lessThan\": \"f98770440c9bc468e2fd878212ec9526dbe08293\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c8383054506c77b814489c09877b5db83fd4abf2\", \"lessThan\": \"9582c7664103c9043e80a78f5c382aa6bdd67418\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c8383054506c77b814489c09877b5db83fd4abf2\", \"lessThan\": \"31ad74b20227ce6b40910ff78b1c604e42975cf1\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/cachefiles/interface.c\", \"fs/cachefiles/ondemand.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.19\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.19\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.1.129\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6.78\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.11.11\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.11.*\"}, {\"status\": \"unaffected\", \"version\": \"6.12.2\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.12.*\"}, {\"status\": \"unaffected\", \"version\": \"6.13\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/cachefiles/interface.c\", \"fs/cachefiles/ondemand.c\"], \"defaultStatus\": \"affected\"}], \"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\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncachefiles: Fix NULL pointer dereference in object-\u003efile\\n\\nAt present, the object-\u003efile has the NULL pointer dereference problem in\\nondemand-mode. The root cause is that the allocated fd and object-\u003efile\\nlifetime are inconsistent, and the user-space invocation to anon_fd uses\\nobject-\u003efile. 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-\u003efile)\\n\\t\\t\\t\\t\\t     object-\u003efile = NULL\\n  // file NULL pointer dereference!\\n  __cachefiles_write(..., file, ...)\\n\\nFix this issue by add an additional reference count to the object-\u003efile\\nbefore write/llseek, and decrement after it finished.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.1.129\", \"versionStartIncluding\": \"5.19\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.6.78\", \"versionStartIncluding\": \"5.19\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.11.11\", \"versionStartIncluding\": \"5.19\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.12.2\", \"versionStartIncluding\": \"5.19\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.13\", \"versionStartIncluding\": \"5.19\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T11:44:58.475Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-56549\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-10-15T21:41:47.066Z\", \"dateReserved\": \"2024-12-27T14:03:05.989Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-12-27T14:11:30.336Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…