CVE-2024-53140 (GCVE-0-2024-53140)
Vulnerability from cvelistv5
Published
2024-12-04 14:20
Modified
2026-08-05 11:44
Summary
In the Linux kernel, the following vulnerability has been resolved: netlink: terminate outstanding dump on socket close Netlink supports iterative dumping of data. It provides the families the following ops: - start - (optional) kicks off the dumping process - dump - actual dump helper, keeps getting called until it returns 0 - done - (optional) pairs with .start, can be used for cleanup The whole process is asynchronous and the repeated calls to .dump don't actually happen in a tight loop, but rather are triggered in response to recvmsg() on the socket. This gives the user full control over the dump, but also means that the user can close the socket without getting to the end of the dump. To make sure .start is always paired with .done we check if there is an ongoing dump before freeing the socket, and if so call .done. The complication is that sockets can get freed from BH and .done is allowed to sleep. So we use a workqueue to defer the call, when needed. Unfortunately this does not work correctly. What we defer is not the cleanup but rather releasing a reference on the socket. We have no guarantee that we own the last reference, if someone else holds the socket they may release it in BH and we're back to square one. The whole dance, however, appears to be unnecessary. Only the user can interact with dumps, so we can clean up when socket is closed. And close always happens in process context. Some async code may still access the socket after close, queue notification skbs to it etc. but no dumps can start, end or otherwise make progress. Delete the workqueue and flush the dump state directly from the release handler. Note that further cleanup is possible in -next, for instance we now always call .done before releasing the main module reference, so dump doesn't have to take a reference of its own.
Impacted products
Vendor Product Version
Linux Linux Version: ed5d7788a934a4b6d6d025e948ed4da496b4f12e
Version: ed5d7788a934a4b6d6d025e948ed4da496b4f12e
Version: ed5d7788a934a4b6d6d025e948ed4da496b4f12e
Version: ed5d7788a934a4b6d6d025e948ed4da496b4f12e
Version: ed5d7788a934a4b6d6d025e948ed4da496b4f12e
Version: ed5d7788a934a4b6d6d025e948ed4da496b4f12e
Version: ed5d7788a934a4b6d6d025e948ed4da496b4f12e
Version: ed5d7788a934a4b6d6d025e948ed4da496b4f12e
Version: baaf0c65bc8ea9c7a404b09bc8cc3b8a1e4f18df
Version: 25d9b4bb64ea964769087fc5ae09aee9c838d759
Version: 4.4.38   
Version: 4.8.14   
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2025-11-03T22:29:42.217Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"
          },
          {
            "url": "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "net/netlink/af_netlink.c",
            "net/netlink/af_netlink.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "114a61d8d94ae3a43b82446cf737fd757021b834",
              "status": "affected",
              "version": "ed5d7788a934a4b6d6d025e948ed4da496b4f12e",
              "versionType": "git"
            },
            {
              "lessThan": "598c956b62699c3753929602560d8df322e60559",
              "status": "affected",
              "version": "ed5d7788a934a4b6d6d025e948ed4da496b4f12e",
              "versionType": "git"
            },
            {
              "lessThan": "6e3f2c512d2b7dbd247485b1dd9e43e4210a18f4",
              "status": "affected",
              "version": "ed5d7788a934a4b6d6d025e948ed4da496b4f12e",
              "versionType": "git"
            },
            {
              "lessThan": "d2fab3d66cc16cfb9e3ea1772abe6b79b71fa603",
              "status": "affected",
              "version": "ed5d7788a934a4b6d6d025e948ed4da496b4f12e",
              "versionType": "git"
            },
            {
              "lessThan": "4e87a52133284afbd40fb522dbf96e258af52a98",
              "status": "affected",
              "version": "ed5d7788a934a4b6d6d025e948ed4da496b4f12e",
              "versionType": "git"
            },
            {
              "lessThan": "bbc769d2fa1b8b368c5fbe013b5b096afa3c05ca",
              "status": "affected",
              "version": "ed5d7788a934a4b6d6d025e948ed4da496b4f12e",
              "versionType": "git"
            },
            {
              "lessThan": "176c41b3ca9281a9736b67c6121b03dbf0c8c08f",
              "status": "affected",
              "version": "ed5d7788a934a4b6d6d025e948ed4da496b4f12e",
              "versionType": "git"
            },
            {
              "lessThan": "1904fb9ebf911441f90a68e96b22aa73e4410505",
              "status": "affected",
              "version": "ed5d7788a934a4b6d6d025e948ed4da496b4f12e",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "baaf0c65bc8ea9c7a404b09bc8cc3b8a1e4f18df",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "25d9b4bb64ea964769087fc5ae09aee9c838d759",
              "versionType": "git"
            },
            {
              "lessThan": "4.5",
              "status": "affected",
              "version": "4.4.38",
              "versionType": "semver"
            },
            {
              "lessThan": "4.9",
              "status": "affected",
              "version": "4.8.14",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/netlink/af_netlink.c",
            "net/netlink/af_netlink.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.9"
            },
            {
              "lessThan": "4.9",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.325",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.287",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.231",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.174",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.119",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.63",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.11.*",
              "status": "unaffected",
              "version": "6.11.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.12",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.325",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.287",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.231",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.174",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.119",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.63",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.11.10",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12",
                  "versionStartIncluding": "4.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "4.4.38",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "4.8.14",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnetlink: terminate outstanding dump on socket close\n\nNetlink supports iterative dumping of data. It provides the families\nthe following ops:\n - start - (optional) kicks off the dumping process\n - dump  - actual dump helper, keeps getting called until it returns 0\n - done  - (optional) pairs with .start, can be used for cleanup\nThe whole process is asynchronous and the repeated calls to .dump\ndon\u0027t actually happen in a tight loop, but rather are triggered\nin response to recvmsg() on the socket.\n\nThis gives the user full control over the dump, but also means that\nthe user can close the socket without getting to the end of the dump.\nTo make sure .start is always paired with .done we check if there\nis an ongoing dump before freeing the socket, and if so call .done.\n\nThe complication is that sockets can get freed from BH and .done\nis allowed to sleep. So we use a workqueue to defer the call, when\nneeded.\n\nUnfortunately this does not work correctly. What we defer is not\nthe cleanup but rather releasing a reference on the socket.\nWe have no guarantee that we own the last reference, if someone\nelse holds the socket they may release it in BH and we\u0027re back\nto square one.\n\nThe whole dance, however, appears to be unnecessary. Only the user\ncan interact with dumps, so we can clean up when socket is closed.\nAnd close always happens in process context. Some async code may\nstill access the socket after close, queue notification skbs to it etc.\nbut no dumps can start, end or otherwise make progress.\n\nDelete the workqueue and flush the dump state directly from the release\nhandler. Note that further cleanup is possible in -next, for instance\nwe now always call .done before releasing the main module reference,\nso dump doesn\u0027t have to take a reference of its own."
        }
      ],
      "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 path is reached entirely through local syscalls \u2014 opening an AF_NETLINK socket, starting a dump, and registering it via mq_notify \u2014 with no network component.\nAC:L - Although triggering requires winning a lifetime race, the local attacker controls both sides (the outstanding dump, the extra reference holder via mqueue, and the socket close/reference drop) and syzkaller reproduced it, so success is reliable.\nPR:L - All required operations (AF_NETLINK socket, netlink dump, POSIX mqueue notification via mq_notify) are available to an ordinary unprivileged local user with no capabilities in the init namespace.\nUI:N - The attacker performs every step (start dump, attach reference, close socket) themselves; no victim action is required.\nS:U - The corruption stays within the kernel\u0027s own security authority; there is no VM/IOMMU/sandbox boundary crossed.\nC:H - The mismanaged socket reference lifetime is characterized as a use-after-free of a heap-allocated netlink_sock object, whose freed-then-reallocated contents an attacker can leverage to read sensitive kernel memory.\nI:H - The same use-after-free permits heap grooming and writes through a reallocated object, enabling memory corruption and potential control-flow hijacking.\nA:H - Executing the sleeping .done callback in atomic/BH context and the use-after-free reliably produce a kernel BUG/oops, deadlock, or panic."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:44:03.721Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/114a61d8d94ae3a43b82446cf737fd757021b834"
        },
        {
          "url": "https://git.kernel.org/stable/c/598c956b62699c3753929602560d8df322e60559"
        },
        {
          "url": "https://git.kernel.org/stable/c/6e3f2c512d2b7dbd247485b1dd9e43e4210a18f4"
        },
        {
          "url": "https://git.kernel.org/stable/c/d2fab3d66cc16cfb9e3ea1772abe6b79b71fa603"
        },
        {
          "url": "https://git.kernel.org/stable/c/4e87a52133284afbd40fb522dbf96e258af52a98"
        },
        {
          "url": "https://git.kernel.org/stable/c/bbc769d2fa1b8b368c5fbe013b5b096afa3c05ca"
        },
        {
          "url": "https://git.kernel.org/stable/c/176c41b3ca9281a9736b67c6121b03dbf0c8c08f"
        },
        {
          "url": "https://git.kernel.org/stable/c/1904fb9ebf911441f90a68e96b22aa73e4410505"
        }
      ],
      "title": "netlink: terminate outstanding dump on socket close",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-53140",
    "datePublished": "2024-12-04T14:20:44.914Z",
    "dateReserved": "2024-11-19T17:17:24.997Z",
    "dateUpdated": "2026-08-05T11:44:03.721Z",
    "state": "PUBLISHED"
  },
  "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…