CVE-2026-31516 (GCVE-0-2026-31516)
Vulnerability from cvelistv5
Published
2026-04-22 13:54
Modified
2026-10-19 18:45
Summary
In the Linux kernel, the following vulnerability has been resolved: xfrm: prevent policy_hthresh.work from racing with netns teardown A XFRM_MSG_NEWSPDINFO request can queue the per-net work item policy_hthresh.work onto the system workqueue. The queued callback, xfrm_hash_rebuild(), retrieves the enclosing struct net via container_of(). If the net namespace is torn down before that work runs, the associated struct net may already have been freed, and xfrm_hash_rebuild() may then dereference stale memory. xfrm_policy_fini() already flushes policy_hash_work during teardown, but it does not synchronize policy_hthresh.work. Synchronize policy_hthresh.work in xfrm_policy_fini() as well, so the queued work cannot outlive the net namespace teardown and access a freed struct net.
Impacted products
Vendor Product Version
Linux Linux Version: 880a6fab8f6ba5b5abe59ea68533202ddea1012c
Version: 880a6fab8f6ba5b5abe59ea68533202ddea1012c
Version: 880a6fab8f6ba5b5abe59ea68533202ddea1012c
Version: 880a6fab8f6ba5b5abe59ea68533202ddea1012c
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2026-31516",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-10-16T15:10:33.949707Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "problemTypes": [
          {
            "descriptions": [
              {
                "cweId": "CWE-416",
                "description": "CWE-416 Use After Free",
                "lang": "en",
                "type": "CWE"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-10-19T18:45:54.791Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "net/xfrm/xfrm_policy.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "56ea2257b83ee29a543f158159e3d1abc1e3e4fe",
              "status": "affected",
              "version": "880a6fab8f6ba5b5abe59ea68533202ddea1012c",
              "versionType": "git"
            },
            {
              "lessThan": "8854e9367465d784046362698731c1111e3b39b8",
              "status": "affected",
              "version": "880a6fab8f6ba5b5abe59ea68533202ddea1012c",
              "versionType": "git"
            },
            {
              "lessThan": "4e2e77843fef473ef47e322d52436d8308582a96",
              "status": "affected",
              "version": "880a6fab8f6ba5b5abe59ea68533202ddea1012c",
              "versionType": "git"
            },
            {
              "lessThan": "29fe3a61bcdce398ee3955101c39f89c01a8a77e",
              "status": "affected",
              "version": "880a6fab8f6ba5b5abe59ea68533202ddea1012c",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/xfrm/xfrm_policy.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.18"
            },
            {
              "lessThan": "3.18",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.80",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.21",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.19.*",
              "status": "unaffected",
              "version": "6.19.11",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.0",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.80",
                  "versionStartIncluding": "3.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.21",
                  "versionStartIncluding": "3.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.19.11",
                  "versionStartIncluding": "3.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.0",
                  "versionStartIncluding": "3.18",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nxfrm: prevent policy_hthresh.work from racing with netns teardown\n\nA XFRM_MSG_NEWSPDINFO request can queue the per-net work item\npolicy_hthresh.work onto the system workqueue.\n\nThe queued callback, xfrm_hash_rebuild(), retrieves the enclosing\nstruct net via container_of(). If the net namespace is torn down\nbefore that work runs, the associated struct net may already have\nbeen freed, and xfrm_hash_rebuild() may then dereference stale memory.\n\nxfrm_policy_fini() already flushes policy_hash_work during teardown,\nbut it does not synchronize policy_hthresh.work.\n\nSynchronize policy_hthresh.work in xfrm_policy_fini() as well, so the\nqueued work cannot outlive the net namespace teardown and access a\nfreed struct net."
        }
      ],
      "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 by a local NETLINK_XFRM request, specifically XFRM_MSG_NEWSPDINFO, not by remote packet processing.\nAC:L - The attacker can create the net namespace, send the request that queues policy_hthresh.work, and tear the namespace down; this is an attacker-controlled race and can be retried.\nPR:L - XFRM netlink operations require CAP_NET_ADMIN over the target network namespace. This is reachable with low privileges via user and network namespaces rather than requiring real init-namespace root.\nUI:N - No victim action is required after the attacker has local execution; the attacker directly drives the netlink request and namespace teardown.\nS:U - The impact is within the kernel security authority and does not cross a separate boundary such as guest-to-host or IOMMU isolation.\nC:H - The bug is a use-after-free of struct net reached by queued work dereferencing stale namespace memory. Under the required conservative kernel scoring guidance, UAF memory corruption is treated as capable of high confidentiality impact.\nI:H - The stale work callback writes through fields in the freed struct net and manipulates policy lists and hash state. As a kernel UAF, this is defensibly scored as high integrity impact due to potential memory corruption and control-flow exploitation.\nA:H - The stale struct net dereference can crash or corrupt the kernel during workqueue execution. Kernel crashes and UAF-triggered failures are high availability impact."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:23:13.439Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/56ea2257b83ee29a543f158159e3d1abc1e3e4fe"
        },
        {
          "url": "https://git.kernel.org/stable/c/8854e9367465d784046362698731c1111e3b39b8"
        },
        {
          "url": "https://git.kernel.org/stable/c/4e2e77843fef473ef47e322d52436d8308582a96"
        },
        {
          "url": "https://git.kernel.org/stable/c/29fe3a61bcdce398ee3955101c39f89c01a8a77e"
        }
      ],
      "title": "xfrm: prevent policy_hthresh.work from racing with netns teardown",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-31516",
    "datePublished": "2026-04-22T13:54:32.851Z",
    "dateReserved": "2026-03-09T15:48:24.107Z",
    "dateUpdated": "2026-10-19T18:45:54.791Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2026-31516\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2026-10-16T15:10:33.949707Z\"}}}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-416\", \"description\": \"CWE-416 Use After Free\"}]}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2026-10-16T15:10:34.550Z\"}}], \"cna\": {\"title\": \"xfrm: prevent policy_hthresh.work from racing with netns teardown\", \"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 path is reached by a local NETLINK_XFRM request, specifically XFRM_MSG_NEWSPDINFO, not by remote packet processing.\\nAC:L - The attacker can create the net namespace, send the request that queues policy_hthresh.work, and tear the namespace down; this is an attacker-controlled race and can be retried.\\nPR:L - XFRM netlink operations require CAP_NET_ADMIN over the target network namespace. This is reachable with low privileges via user and network namespaces rather than requiring real init-namespace root.\\nUI:N - No victim action is required after the attacker has local execution; the attacker directly drives the netlink request and namespace teardown.\\nS:U - The impact is within the kernel security authority and does not cross a separate boundary such as guest-to-host or IOMMU isolation.\\nC:H - The bug is a use-after-free of struct net reached by queued work dereferencing stale namespace memory. Under the required conservative kernel scoring guidance, UAF memory corruption is treated as capable of high confidentiality impact.\\nI:H - The stale work callback writes through fields in the freed struct net and manipulates policy lists and hash state. As a kernel UAF, this is defensibly scored as high integrity impact due to potential memory corruption and control-flow exploitation.\\nA:H - The stale struct net dereference can crash or corrupt the kernel during workqueue execution. Kernel crashes and UAF-triggered failures are high availability impact.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"880a6fab8f6ba5b5abe59ea68533202ddea1012c\", \"lessThan\": \"56ea2257b83ee29a543f158159e3d1abc1e3e4fe\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"880a6fab8f6ba5b5abe59ea68533202ddea1012c\", \"lessThan\": \"8854e9367465d784046362698731c1111e3b39b8\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"880a6fab8f6ba5b5abe59ea68533202ddea1012c\", \"lessThan\": \"4e2e77843fef473ef47e322d52436d8308582a96\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"880a6fab8f6ba5b5abe59ea68533202ddea1012c\", \"lessThan\": \"29fe3a61bcdce398ee3955101c39f89c01a8a77e\", \"versionType\": \"git\"}], \"programFiles\": [\"net/xfrm/xfrm_policy.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"3.18\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"3.18\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.12.80\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.12.*\"}, {\"status\": \"unaffected\", \"version\": \"6.18.21\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.18.*\"}, {\"status\": \"unaffected\", \"version\": \"6.19.11\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.19.*\"}, {\"status\": \"unaffected\", \"version\": \"7.0\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"net/xfrm/xfrm_policy.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/56ea2257b83ee29a543f158159e3d1abc1e3e4fe\"}, {\"url\": \"https://git.kernel.org/stable/c/8854e9367465d784046362698731c1111e3b39b8\"}, {\"url\": \"https://git.kernel.org/stable/c/4e2e77843fef473ef47e322d52436d8308582a96\"}, {\"url\": \"https://git.kernel.org/stable/c/29fe3a61bcdce398ee3955101c39f89c01a8a77e\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nxfrm: prevent policy_hthresh.work from racing with netns teardown\\n\\nA XFRM_MSG_NEWSPDINFO request can queue the per-net work item\\npolicy_hthresh.work onto the system workqueue.\\n\\nThe queued callback, xfrm_hash_rebuild(), retrieves the enclosing\\nstruct net via container_of(). If the net namespace is torn down\\nbefore that work runs, the associated struct net may already have\\nbeen freed, and xfrm_hash_rebuild() may then dereference stale memory.\\n\\nxfrm_policy_fini() already flushes policy_hash_work during teardown,\\nbut it does not synchronize policy_hthresh.work.\\n\\nSynchronize policy_hthresh.work in xfrm_policy_fini() as well, so the\\nqueued work cannot outlive the net namespace teardown and access a\\nfreed struct net.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.12.80\", \"versionStartIncluding\": \"3.18\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.18.21\", \"versionStartIncluding\": \"3.18\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.19.11\", \"versionStartIncluding\": \"3.18\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"7.0\", \"versionStartIncluding\": \"3.18\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T12:23:13.439Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2026-31516\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-10-19T18:45:54.791Z\", \"dateReserved\": \"2026-03-09T15:48:24.107Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2026-04-22T13:54:32.851Z\", \"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…