{"api_version":"1","generated_at":"2026-04-25T14:02:10+00:00","cve":"CVE-2026-31516","urls":{"html":"https://cve.report/CVE-2026-31516","api":"https://cve.report/api/cve/CVE-2026-31516.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-31516","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-31516"},"summary":{"title":"xfrm: prevent policy_hthresh.work from racing with netns teardown","description":"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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-04-22 14:16:51","updated_at":"2026-04-23 16:17:41"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/56ea2257b83ee29a543f158159e3d1abc1e3e4fe","name":"https://git.kernel.org/stable/c/56ea2257b83ee29a543f158159e3d1abc1e3e4fe","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/29fe3a61bcdce398ee3955101c39f89c01a8a77e","name":"https://git.kernel.org/stable/c/29fe3a61bcdce398ee3955101c39f89c01a8a77e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/4e2e77843fef473ef47e322d52436d8308582a96","name":"https://git.kernel.org/stable/c/4e2e77843fef473ef47e322d52436d8308582a96","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/8854e9367465d784046362698731c1111e3b39b8","name":"https://git.kernel.org/stable/c/8854e9367465d784046362698731c1111e3b39b8","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-31516","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31516","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 880a6fab8f6ba5b5abe59ea68533202ddea1012c 56ea2257b83ee29a543f158159e3d1abc1e3e4fe git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 880a6fab8f6ba5b5abe59ea68533202ddea1012c 8854e9367465d784046362698731c1111e3b39b8 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 880a6fab8f6ba5b5abe59ea68533202ddea1012c 4e2e77843fef473ef47e322d52436d8308582a96 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 880a6fab8f6ba5b5abe59ea68533202ddea1012c 29fe3a61bcdce398ee3955101c39f89c01a8a77e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 3.18","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 3.18 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.80 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.21 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.19.11 6.19.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"31516","cve":"CVE-2026-31516","epss":"0.000180000","percentile":"0.045840000","score_date":"2026-04-24","updated_at":"2026-04-25 00:14:35"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"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."}],"providerMetadata":{"dateUpdated":"2026-04-22T13:54:32.851Z","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-04-22T13:54:32.851Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-04-22 14:16:51","lastModifiedDate":"2026-04-23 16:17:41","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"31516","Ordinal":"1","Title":"xfrm: prevent policy_hthresh.work from racing with netns teardow","CVE":"CVE-2026-31516","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"31516","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"xfrm: prevent policy_hthresh.work from racing with netns teardow"}]}}}