{"id":"CVE-2026-64580","state":"PUBLISHED","title":"xfrm6: clear dst.dev on error to avoid double netdev_put in xfrm6_fill_dst()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nxfrm6: clear dst.dev on error to avoid double netdev_put in xfrm6_fill_dst()\n\nOn the error path where in6_dev_get(dev) returns NULL, xfrm6_fill_dst()\nreleases the device reference with netdev_put() but leaves\nxdst->u.dst.dev set. dst_destroy() later calls netdev_put(dst->dev)\nagain, so the same net_device reference is released twice, underflowing\nits refcount (ref_tracker WARNING + \"unregister_netdevice: waiting for\n<dev> to become free\").\n\nClear xdst->u.dst.dev after the netdev_put(), the same way the XFRM\ndevice-offload paths xfrm_dev_state_add() and xfrm_dev_policy_add() in\nnet/xfrm/xfrm_device.c NULL ->dev when releasing the reference on error.\n\n  ref_tracker: reference already released.\n  ref_tracker: allocated in:\n   xfrm6_fill_dst (net/ipv6/xfrm6_policy.c:86)\n   ...\n   udpv6_sendmsg (net/ipv6/udp.c:1696)\n   ...\n  ref_tracker: freed in:\n   xfrm6_fill_dst (net/ipv6/xfrm6_policy.c:90)\n   ...\n  WARNING: lib/ref_tracker.c:322 at ref_tracker_free+0x58b/0x780\n   dst_destroy (net/core/dst.c:115)\n   rcu_core\n   handle_softirqs\n   ...","publishedAt":"2026-08-05T08:09:34.946Z","updatedAt":"2026-10-19T20:48:42.908Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"84c4a9dfbf430861e7588d95ae3ff61535dca351","status":"affected","lessThan":"97e032e5733e49471fb73de117ea2ac1ac7c479a","versionType":"git"},{"version":"84c4a9dfbf430861e7588d95ae3ff61535dca351","status":"affected","lessThan":"df6856c2dda9187601d29b5fbd7a81b3b178cedf","versionType":"git"},{"version":"84c4a9dfbf430861e7588d95ae3ff61535dca351","status":"affected","lessThan":"43de8a49335e611adb271bbd52e84dfbc11fc185","versionType":"git"},{"version":"84c4a9dfbf430861e7588d95ae3ff61535dca351","status":"affected","lessThan":"ff636d7b7cba6dea82ecf580415ea57f2c1a11b6","versionType":"git"},{"version":"84c4a9dfbf430861e7588d95ae3ff61535dca351","status":"affected","lessThan":"e078da1b4e11390cff3201c19a9a1fe70c5b934f","versionType":"git"},{"version":"84c4a9dfbf430861e7588d95ae3ff61535dca351","status":"affected","lessThan":"136992de9bb91871084ae52d172610541c76e4d2","versionType":"git"},{"version":"a7e22d0c0e81dde129a51ee413644124f4b59954","status":"affected","versionType":"git"},{"version":"01b0d887f67a388fb2a658ee2bdd74e5ba146818","status":"affected","versionType":"git"},{"version":"a98124aac0b5adc5de8ae54f11322781cb4d85c3","status":"affected","versionType":"git"},{"version":"e27b7bee743d921f037b1da6f071237345bef7c1","status":"affected","versionType":"git"},{"version":"3.0.79","status":"affected","lessThan":"3.1","versionType":"semver"},{"version":"3.2.46","status":"affected","lessThan":"3.3","versionType":"semver"},{"version":"3.4.46","status":"affected","lessThan":"3.5","versionType":"semver"},{"version":"3.9.3","status":"affected","lessThan":"3.10","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv6/xfrm6_policy.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.10","versionType":"semver"},{"version":"6.1.183","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.148","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.101","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.42","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv6/xfrm6_policy.c"]}],"references":["https://git.kernel.org/stable/c/97e032e5733e49471fb73de117ea2ac1ac7c479a","https://git.kernel.org/stable/c/df6856c2dda9187601d29b5fbd7a81b3b178cedf","https://git.kernel.org/stable/c/43de8a49335e611adb271bbd52e84dfbc11fc185","https://git.kernel.org/stable/c/ff636d7b7cba6dea82ecf580415ea57f2c1a11b6","https://git.kernel.org/stable/c/e078da1b4e11390cff3201c19a9a1fe70c5b934f","https://git.kernel.org/stable/c/136992de9bb91871084ae52d172610541c76e4d2"],"weaknesses":["CWE-415"],"ingestedAt":"2026-10-29T20:12:41.951Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/64xxx/CVE-2026-64580.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-64580","state":"PUBLISHED","datePublished":"2026-08-05T08:09:34.946Z","dateUpdated":"2026-10-19T20:48:42.908Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-07-19T15:36:31.798Z"},"containers":{"cna":{"title":"xfrm6: clear dst.dev on error to avoid double netdev_put in xfrm6_fill_dst()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nxfrm6: clear dst.dev on error to avoid double netdev_put in xfrm6_fill_dst()\n\nOn the error path where in6_dev_get(dev) returns NULL, xfrm6_fill_dst()\nreleases the device reference with netdev_put() but leaves\nxdst->u.dst.dev set. dst_destroy() later calls netdev_put(dst->dev)\nagain, so the same net_device reference is released twice, underflowing\nits refcount (ref_tracker WARNING + \"unregister_netdevice: waiting for\n<dev> to become free\").\n\nClear xdst->u.dst.dev after the netdev_put(), the same way the XFRM\ndevice-offload paths xfrm_dev_state_add() and xfrm_dev_policy_add() in\nnet/xfrm/xfrm_device.c NULL ->dev when releasing the reference on error.\n\n  ref_tracker: reference already released.\n  ref_tracker: allocated in:\n   xfrm6_fill_dst (net/ipv6/xfrm6_policy.c:86)\n   ...\n   udpv6_sendmsg (net/ipv6/udp.c:1696)\n   ...\n  ref_tracker: freed in:\n   xfrm6_fill_dst (net/ipv6/xfrm6_policy.c:90)\n   ...\n  WARNING: lib/ref_tracker.c:322 at ref_tracker_free+0x58b/0x780\n   dst_destroy (net/core/dst.c:115)\n   rcu_core\n   handle_softirqs\n   ..."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"84c4a9dfbf430861e7588d95ae3ff61535dca351","status":"affected","lessThan":"97e032e5733e49471fb73de117ea2ac1ac7c479a","versionType":"git"},{"version":"84c4a9dfbf430861e7588d95ae3ff61535dca351","status":"affected","lessThan":"df6856c2dda9187601d29b5fbd7a81b3b178cedf","versionType":"git"},{"version":"84c4a9dfbf430861e7588d95ae3ff61535dca351","status":"affected","lessThan":"43de8a49335e611adb271bbd52e84dfbc11fc185","versionType":"git"},{"version":"84c4a9dfbf430861e7588d95ae3ff61535dca351","status":"affected","lessThan":"ff636d7b7cba6dea82ecf580415ea57f2c1a11b6","versionType":"git"},{"version":"84c4a9dfbf430861e7588d95ae3ff61535dca351","status":"affected","lessThan":"e078da1b4e11390cff3201c19a9a1fe70c5b934f","versionType":"git"},{"version":"84c4a9dfbf430861e7588d95ae3ff61535dca351","status":"affected","lessThan":"136992de9bb91871084ae52d172610541c76e4d2","versionType":"git"},{"version":"a7e22d0c0e81dde129a51ee413644124f4b59954","status":"affected","versionType":"git"},{"version":"01b0d887f67a388fb2a658ee2bdd74e5ba146818","status":"affected","versionType":"git"},{"version":"a98124aac0b5adc5de8ae54f11322781cb4d85c3","status":"affected","versionType":"git"},{"version":"e27b7bee743d921f037b1da6f071237345bef7c1","status":"affected","versionType":"git"},{"version":"3.0.79","status":"affected","lessThan":"3.1","versionType":"semver"},{"version":"3.2.46","status":"affected","lessThan":"3.3","versionType":"semver"},{"version":"3.4.46","status":"affected","lessThan":"3.5","versionType":"semver"},{"version":"3.9.3","status":"affected","lessThan":"3.10","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv6/xfrm6_policy.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.10","versionType":"semver"},{"version":"6.1.183","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.148","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.101","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.42","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv6/xfrm6_policy.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/97e032e5733e49471fb73de117ea2ac1ac7c479a"},{"url":"https://git.kernel.org/stable/c/df6856c2dda9187601d29b5fbd7a81b3b178cedf"},{"url":"https://git.kernel.org/stable/c/43de8a49335e611adb271bbd52e84dfbc11fc185"},{"url":"https://git.kernel.org/stable/c/ff636d7b7cba6dea82ecf580415ea57f2c1a11b6"},{"url":"https://git.kernel.org/stable/c/e078da1b4e11390cff3201c19a9a1fe70c5b934f"},{"url":"https://git.kernel.org/stable/c/136992de9bb91871084ae52d172610541c76e4d2"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is reached on the local IPv6 outbound path (udpv6_sendmsg → xfrm_lookup → xfrm6_fill_dst) after configuring XFRM policy/state via netlink or IPV6_XFRM_POLICY; a remote peer cannot drive that configuration or the device state that makes in6_dev_get fail.\nAC:L - An attacker in their own netns can create interfaces, install IPv6 XFRM policy/state, generate matching UDP traffic, and concurrently drop MTU below IPV6_MIN_MTU or unregister the device to clear ip6_ptr, so they control both sides of the window that hits the error path; once entered, the double netdev_put is deterministic.\nPR:L - XFRM configuration requires CAP_NET_ADMIN via netlink_net_capable/sockopt_ns_capable, which is ns_capable() in the netns user_ns, so an unprivileged user obtains it with unshare -Urn rather than real init-namespace root.\nUI:N - No victim action is required; the attacker configures XFRM, manipulates their own netdevs, and sends packets entirely with their own processes.\nS:U - The impact is kernel net_device refcount corruption within the same host kernel authority; this is ordinary local privilege-escalation/DoS territory, not a VM escape or IOMMU/sandbox boundary cross.\nC:H - The leftover dst.dev causes a second netdev_put in dst_destroy, underflowing the net_device refcount and enabling use-after-free of the device object, which per kernel UAF guidance yields a high confidentiality/info-disclosure primitive.\nI:H - A net_device refcount underflow/UAF is heap memory corruption that can be shaped via reuse/spraying into arbitrary write or control-flow hijack, so integrity impact is high.\nA:H - Even without full exploitation, the double put triggers ref_tracker warnings and can oops/panic or hang device unregister (unregister_netdevice waiting for the device to become free), so availability impact is high."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-19T16:29:07.038Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"6.1.183"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"6.6.148"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"6.12.101"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"6.18.42"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"7.1.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"7.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.0.79"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.2.46"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.4.46"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.9.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-64580","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-16T15:43:14.319059Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-415","lang":"en","type":"CWE","description":"CWE-415 Double Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T20:48:42.908Z"}}]}}}