{"id":"CVE-2026-31516","aliases":["CVE-2026-31516"],"related":[],"kind":"vulnerability","state":"published","title":"xfrm: prevent policy_hthresh.work from racing with netns teardown","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nxfrm: evitar que policy_hthresh.work compita con el desmantelamiento de netns\n\nUna solicitud XFRM_MSG_NEWSPDINFO puede encolar el elemento de trabajo por red policy_hthresh.work en la cola de trabajo del sistema.\n\nLa devolución de llamada encolada, xfrm_hash_rebuild(), recupera la struct net contenedora a través de container_of(). Si el espacio de nombres de red es desmantelado antes de que se ejecute ese trabajo, la struct net asociada puede que ya haya sido liberada, y xfrm_hash_rebuild() puede entonces desreferenciar memoria obsoleta.\n\nxfrm_policy_fini() ya vacía policy_hash_work durante el desmantelamiento, pero no sincroniza policy_hthresh.work.\n\nSincronizar policy_hthresh.work también en xfrm_policy_fini(), para que el trabajo encolado no pueda sobrevivir al desmantelamiento del espacio de nombres de red y acceder a una struct net liberada.","source":"nvd"}],"published":"2026-04-22T13:54:32.851Z","modified":"2026-11-11T23:10:00.263Z","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"}],"cwes":["CWE-362","CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"880a6fab8f6ba5b5abe59ea68533202ddea1012c","fixed":"56ea2257b83ee29a543f158159e3d1abc1e3e4fe","status":"affected"},{"type":"git","introduced":"880a6fab8f6ba5b5abe59ea68533202ddea1012c","fixed":"8854e9367465d784046362698731c1111e3b39b8","status":"affected"},{"type":"git","introduced":"880a6fab8f6ba5b5abe59ea68533202ddea1012c","fixed":"4e2e77843fef473ef47e322d52436d8308582a96","status":"affected"},{"type":"git","introduced":"880a6fab8f6ba5b5abe59ea68533202ddea1012c","fixed":"29fe3a61bcdce398ee3955101c39f89c01a8a77e","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.18","status":"unaffected"},{"type":"semver","introduced":"6.12.80","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.21","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.11","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","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":"3.18.1","fixed":"6.12.80"},{"status":"affected","introduced":"6.13","fixed":"6.18.21"},{"status":"affected","introduced":"6.19","fixed":"6.19.11"},{"status":"affected","version":"3.18"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/56ea2257b83ee29a543f158159e3d1abc1e3e4fe","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8854e9367465d784046362698731c1111e3b39b8","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4e2e77843fef473ef47e322d52436d8308582a96","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/29fe3a61bcdce398ee3955101c39f89c01a8a77e","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-16T15:10:33.949Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31516","url":"https://www.cve.org/CVERecord?id=CVE-2026-31516","licence":"CVE Terms of Use","modified":"2026-10-19T18:45:54.791Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31516","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31516","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.306Z","epss":{"score":0.00104,"percentile":0.01077,"date":"2026-12-01T12:00:22.000Z"}}