{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-98364","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-09-25T10:25:14.344Z","datePublished":"2026-10-06T08:46:50.051Z","dateUpdated":"2026-10-07T06:50:17.322Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-10-07T06:50:17.322Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nxfrm: hold net_device reference under RCU in bundle creation\n\nxfrm_bundle_create() and xfrm_create_dummy_bundle() read dst->dev into\na local pointer without taking a device reference, then pass it to\nxfrm_fill_dst(). A concurrent RTM_DELLINK replaces dst->dev via\ndst_dev_put() and frees the old net_device, causing a use-after-free\nwhen xfrm6_fill_dst() later dereferences the stale dev pointer.\n\n  BUG: KASAN: slab-use-after-free in xfrm6_fill_dst+0x82c/0x860\n  (net/ipv6/xfrm6_policy.c:86 netdev_hold())\n  Read of size 8 at addr ffff8880142fe588 by task exploit/153\n  Call Trace:\n   xfrm6_fill_dst+0x82c/0x860\n   xfrm_resolve_and_create_bundle+0x21d4/0x2bd0\n   xfrm_lookup_with_ifid+0x485/0x1640\n   ip6_dst_lookup_flow+0x19b/0x1e0\n   udpv6_sendmsg+0x1443/0x2dd0\n\nFix this by reading dst->dev via dst_dev_rcu() and keeping the RCU\nread-side critical section active until xfrm_fill_dst() has taken the\nrequired device references."}],"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 - Both sides of the race are local syscalls: sendmsg() (udpv6_sendmsg->ip6_dst_lookup_flow->xfrm_lookup_with_ifid->xfrm_bundle_create) and an RTM_DELLINK rtnetlink request that frees the net_device. A remote peer cannot delete the link, so the network cannot cause the freed state.\nAC:L - The attacker controls both sides of the race: they repeatedly send through an xfrm-policy-matched route while deleting the link in a loop. The window between reading dst->dev and netdev_hold() in xfrm_fill_dst() is short, but the attacker can retry as often as needed.\nPR:L - xfrm_user_rcv_msg only checks netlink_net_capable(CAP_NET_ADMIN), and RTM_DELLINK is also checked per namespace. An unprivileged user with unshare -Urn can create a device, install the XFRM policy and state, and delete the device inside their own network namespace.\nUI:N - No victim action is needed: the attacker sets up the namespace, the xfrm configuration, the sending socket and the link deletion entirely on their own.\nS:U - The use-after-free is inside the kernel's own networking code and the impact stays within the kernel's security authority; no VM or IOMMU boundary is crossed.\nC:H - xfrm6_fill_dst() reads dev->ip6_ptr from the freed net_device through in6_dev_get() and stores the stale dev in a new dst. A reclaimed object controls those values, which can be used to disclose kernel memory.\nI:H - netdev_hold() increments a refcount inside the freed net_device, and in6_dev_get() increments a refcount on a pointer taken from the reclaimed object. Both are writes into attacker-reclaimable slab memory, usable to corrupt kernel data and hijack control flow.\nA:H - KASAN reports a slab-use-after-free in xfrm6_fill_dst(). On production kernels the stale dev stays attached to the new xfrm dst and is dereferenced later, which leads to an oops or panic."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/xfrm/xfrm_policy.c"],"versions":[{"version":"25ee3286dcbc830a833354bb1d15567956844813","lessThan":"8d85d6bc9c46dc41cb2be0eac53f8ab068c3a807","status":"affected","versionType":"git"},{"version":"25ee3286dcbc830a833354bb1d15567956844813","lessThan":"9fa903b24b1f46b4ff5443bcd4aca23e5c57f9c1","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/xfrm/xfrm_policy.c"],"versions":[{"version":"2.6.25","status":"affected"},{"version":"0","lessThan":"2.6.25","status":"unaffected","versionType":"semver"},{"version":"7.2.8","lessThanOrEqual":"7.2.*","status":"unaffected","versionType":"semver"},{"version":"7.3-rc4","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"7.2.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.25","versionEndExcluding":"7.3-rc4"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/8d85d6bc9c46dc41cb2be0eac53f8ab068c3a807"},{"url":"https://git.kernel.org/stable/c/9fa903b24b1f46b4ff5443bcd4aca23e5c57f9c1"}],"title":"xfrm: hold net_device reference under RCU in bundle creation","x_generator":{"engine":"bippy-1.2.0"}}}}