{"id":"CVE-2026-99320","state":"PUBLISHED","title":"ipv6: raw: fix use-after-free in rawv6_send_hdrinc()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nipv6: raw: fix use-after-free in rawv6_send_hdrinc()\n\nrawv6_send_hdrinc() caches the route before handing the skb to\nl3mdev_ip6_out(). The VRF output path may replace skb->dst and release\nthe original route, leaving the cached pointer stale.\n\nThe function later dereferences that pointer for statistics accounting\nand as the output device passed to NF_HOOK(). Its RCU read-side critical\nsection starts after l3mdev_ip6_out(), so it cannot prevent the old route\nfrom being reclaimed in between.\n\nReload the route from the current skb destination after\nl3mdev_ip6_out() returns.\n\nKASAN reports a slab-use-after-free in rawv6_sendmsg(), with the route\nallocated by ip6_dst_alloc(), freed by dst_destroy() from rcu_core(), and\nthe related RCU callback queued from vrf_l3_out().","publishedAt":"2026-11-19T08:09:56.238Z","updatedAt":"2026-11-19T13:52:55.301Z","severity":{"score":7,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/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":"4c1feac58e06270321cc500b85c2d94a11495775","status":"affected","lessThan":"afb69c90cf62b630bf74c82d7bcfca840db8b076","versionType":"git"},{"version":"4c1feac58e06270321cc500b85c2d94a11495775","status":"affected","lessThan":"3fda55b34d8f1621676f1238728c16033dff1148","versionType":"git"},{"version":"4c1feac58e06270321cc500b85c2d94a11495775","status":"affected","lessThan":"18772182967f9a0160dc7ada43311eab87c3d9ec","versionType":"git"},{"version":"4c1feac58e06270321cc500b85c2d94a11495775","status":"affected","lessThan":"66dfb2cacda7faae614d688943d85e75abf7f586","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv6/raw.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.9","versionType":"semver"},{"version":"6.12.118","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.64","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.5","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv6/raw.c"]}],"references":["https://git.kernel.org/stable/c/afb69c90cf62b630bf74c82d7bcfca840db8b076","https://git.kernel.org/stable/c/3fda55b34d8f1621676f1238728c16033dff1148","https://git.kernel.org/stable/c/18772182967f9a0160dc7ada43311eab87c3d9ec","https://git.kernel.org/stable/c/66dfb2cacda7faae614d688943d85e75abf7f586"],"weaknesses":[],"ingestedAt":"2026-11-19T13:58:06.563Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/99xxx/CVE-2026-99320.json","commit":"5284c0aaed448bdf5be406b31f52fecb38b554c5","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99320","state":"PUBLISHED","datePublished":"2026-11-19T08:09:56.238Z","dateUpdated":"2026-11-19T13:52:55.301Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.407Z"},"containers":{"cna":{"title":"ipv6: raw: fix use-after-free in rawv6_send_hdrinc()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nipv6: raw: fix use-after-free in rawv6_send_hdrinc()\n\nrawv6_send_hdrinc() caches the route before handing the skb to\nl3mdev_ip6_out(). The VRF output path may replace skb->dst and release\nthe original route, leaving the cached pointer stale.\n\nThe function later dereferences that pointer for statistics accounting\nand as the output device passed to NF_HOOK(). Its RCU read-side critical\nsection starts after l3mdev_ip6_out(), so it cannot prevent the old route\nfrom being reclaimed in between.\n\nReload the route from the current skb destination after\nl3mdev_ip6_out() returns.\n\nKASAN reports a slab-use-after-free in rawv6_sendmsg(), with the route\nallocated by ip6_dst_alloc(), freed by dst_destroy() from rcu_core(), and\nthe related RCU callback queued from vrf_l3_out()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4c1feac58e06270321cc500b85c2d94a11495775","status":"affected","lessThan":"afb69c90cf62b630bf74c82d7bcfca840db8b076","versionType":"git"},{"version":"4c1feac58e06270321cc500b85c2d94a11495775","status":"affected","lessThan":"3fda55b34d8f1621676f1238728c16033dff1148","versionType":"git"},{"version":"4c1feac58e06270321cc500b85c2d94a11495775","status":"affected","lessThan":"18772182967f9a0160dc7ada43311eab87c3d9ec","versionType":"git"},{"version":"4c1feac58e06270321cc500b85c2d94a11495775","status":"affected","lessThan":"66dfb2cacda7faae614d688943d85e75abf7f586","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv6/raw.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.9","versionType":"semver"},{"version":"6.12.118","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.64","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.5","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/ipv6/raw.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/afb69c90cf62b630bf74c82d7bcfca840db8b076"},{"url":"https://git.kernel.org/stable/c/3fda55b34d8f1621676f1238728c16033dff1148"},{"url":"https://git.kernel.org/stable/c/18772182967f9a0160dc7ada43311eab87c3d9ec"},{"url":"https://git.kernel.org/stable/c/66dfb2cacda7faae614d688943d85e75abf7f586"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - sendmsg() on an AF_INET6 SOCK_RAW socket enters rawv6_send_hdrinc() through inet_sendmsg() and rawv6_sendmsg() when HDRINCL is set. The route that vrf_ip6_out_redirect() drops with skb_dst_drop() is the one this local send cached before calling l3mdev_ip6_out().\nAC:H - HDRINCL sets FLOWI_FLAG_KNOWN_NH, so ip6_pol_route() returns a one-ref ip6_rt_cache_alloc() route when the nexthop has no gateway, and skb_dst_drop() only call_rcu_hurry()s dst_destroy. rawv6_send_hdrinc() then uses that rt with no attacker-controlled stall after l3mdev_ip6_out() returns, so the slab is reclaimed only if an RCU grace period finishes in that gap.\nPR:L - inet6_create() requires CAP_NET_RAW in the socket netns user namespace. vrf_ip6_out_redirect() runs only when the egress device is an l3 slave and qdisc_tx_is_default() is false, and creating that VRF and qdisc needs CAP_NET_ADMIN in rtnetlink_rcv_msg(). An unprivileged user gets both via a user and network namespace.\nUI:N - The attacker opens the AF_INET6 SOCK_RAW socket, adds the VRF qdisc, and calls sendmsg() to an on-link global address.\nS:U - The freed object is the rt6_info for this socket's own output route, and the corruption is kernel memory in the caller's security domain.\nC:H - After dst_destroy() frees the rt6_info, rawv6_send_hdrinc() loads rt->rt6i_idev for IP6_INC_STATS() and rt->dst.dev for NF_HOOK(). Reclaiming that ip6_dst_ops slab lets the attacker choose those pointers and disclose kernel memory through the resulting dereferences.\nI:H - IP6_INC_STATS() increments a counter through the freed rt->rt6i_idev, and NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT) uses the freed rt->dst.dev as the output net_device. Reusing the route slab supplies those pointers and yields a kernel write.\nA:H - dst_destroy() frees the route from rcu_core() after vrf_l3_out() queues the callback, and rawv6_send_hdrinc() then dereferences it. That slab use-after-free oopses the kernel; KASAN reports it in rawv6_sendmsg()."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-19T13:52:55.301Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.9","versionEndExcluding":"6.12.118"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.9","versionEndExcluding":"6.18.64"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.9","versionEndExcluding":"7.3.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.9","versionEndExcluding":"7.4-rc2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}