Kernel Kit / Infix / v26.10.0latest
CVE-2026-98364
7.8highlinux6.18.60 · 6.18.54 · 6.18.8 · 6.12.21in 4 of 4 releases
Not yet analysed by NVD. Matched on the vendor's record; this may change when NVD has analysed it.
Reach linux · 8 builds in 4 of 4 releases
full reviewcross-check✓ a member decided
Description · NVD
xfrm: hold net_device reference under RCU in bundle creation
xfrm_bundle_create() and xfrm_create_dummy_bundle() read dst->dev into a local pointer without taking a device reference, then pass it to xfrm_fill_dst(). A concurrent RTM_DELLINK replaces dst->dev via dst_dev_put() and frees the old net_device, causing a use-after-free when xfrm6_fill_dst() later dereferences the stale dev pointer.
BUG: KASAN: slab-use-after-free in xfrm6_fill_dst+0x82c/0x860 (net/ipv6/xfrm6_policy.c:86 netdev_hold()) Read of size 8 at addr ffff8880142fe588 by task exploit/153 Call Trace: xfrm6_fill_dst+0x82c/0x860 xfrm_resolve_and_create_bundle+0x21d4/0x2bd0 xfrm_lookup_with_ifid+0x485/0x1640 ip6_dst_lookup_flow+0x19b/0x1e0 udpv6_sendmsg+0x1443/0x2dd0
Fix this by reading dst->dev via dst_dev_rcu() and keeping the RCU read-side critical section active until xfrm_fill_dst() has taken the required device references.
Published 2026-10-06NVD
CVSS 3.1Local · low privileges · no user interaction
How it is reached
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
What it costs
- Confidentiality
- High
- Integrity
- High
- Availability
- High
- Scope
- Unchanged
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
The vulnerable code is in this build: xfrm_bundle_create() and xfrm_create_dummy_bundle() in net/xfrm/xfrm_policy.c still read dst->dev without dst_dev_rcu() or an RCU section, and the file is compiled (CONFIG_XFRM=y). No applied patch touches xfrm.
It cannot be reached on a shipped device. Bundle creation only runs when an XFRM policy with transforms exists, and both ways of installing one are compiled out: CONFIG_XFRM_USER and CONFIG_NET_KEY are not set. No key manager registers, so the per-socket IP_XFRM_POLICY/IPV6_XFRM_POLICY setsockopt returns -EINVAL, and xfrm_lookup_with_ifid() always exits at its "no policy" shortcut.
There is no IPsec YANG model, CLI command or service in Infix that could enable it. Even a root shell is not enough; it would take a rebuilt kernel or an out-of-tree module providing xfrm_user or af_key. It is not reachable from the network.
Evidence 12
`xfrm_bundle_create()` does a plain `dev = dst->dev;` with no `dst_dev_rcu()` and no RCU read lock before `xfrm_fill_dst()` at line 2782, so the fix is absent.
output/build/linux-6.18.60/net/xfrm/xfrm_policy.c:2773
`xfrm_create_dummy_bundle()` has the same unfixed `dev = dst->dev;` before `xfrm_fill_dst()` at line 3065.
output/build/linux-6.18.60/net/xfrm/xfrm_policy.c:3061
The only `rcu_read_unlock()` in `xfrm_fill_dst()` pairs with the lock taken in `xfrm_policy_get_afinfo()` (line 263); it is the original pre-fix code, not part of the fix.
output/build/linux-6.18.60/net/xfrm/xfrm_policy.c:2638-2653
The `dst_dev_rcu()` helper exists in this tree, but `net/xfrm/xfrm_policy.c` does not use it anywhere.
output/build/linux-6.18.60/include/net/dst.h:580
`net/xfrm/xfrm_policy.o` was built, as was `net/ipv6/xfrm6_policy.o` (line 22144); no `xfrm_user.o`, `af_key.o`, `xfrm_interface` or `esp4`/`esp6` objects are listed.
output/objects.txt:22129
`CONFIG_XFRM=y`, while `CONFIG_XFRM_USER`, `CONFIG_XFRM_INTERFACE`, `CONFIG_NET_KEY` and `CONFIG_XFRM_IPTFS` are not set.
output/build/linux-6.18.60/.config:1051-1058
`CONFIG_INET_AH`, `CONFIG_INET_ESP`, `CONFIG_INET_IPCOMP` and their IPv6 counterparts are not set, so no transform types exist to build a bundle from.
output/build/linux-6.18.60/.config:1085-1105
`xfrm_user.o` is built only with `CONFIG_XFRM_USER`. The only callers of `xfrm_policy_insert()` and `xfrm_register_km()` are `net/xfrm/xfrm_user.c:2252,4261` and `net/key/af_key.c:2352,3937`, neither of which is compiled.
output/build/linux-6.18.60/net/xfrm/Makefile:20
`xfrm_user_policy()` (the socket-option path) starts with `err = -EINVAL` and only inserts a socket policy if a registered key manager's `compile_policy` succeeds; with an empty `xfrm_km_list` it never does.
output/build/linux-6.18.60/net/xfrm/xfrm_state.c:3010-3021
`xfrm_lookup_with_ifid()` reaches bundle creation only if `sk->sk_policy[XFRM_POLICY_OUT]` is set or `net->xfrm.policy_count[XFRM_POLICY_OUT]` is non-zero; otherwise it jumps to `nopol`.
output/build/linux-6.18.60/net/xfrm/xfrm_policy.c:3184-3229
None of the 139 applied patches matches `xfrm`, `rcu` or `dst` by name, so no backport of the fix is applied.
output/build/linux-6.18.60/.applied_patches_list
A search for `ipsec`, `xfrm` and `strongswan` under `src/confd` and `board/common/rootfs` hits only the OSPF/RIP YANG models, `infix-firewall-services.yang` and `etc/services`; there is no IPsec model or service that could configure XFRM policies.
src/confd/yang/confd/
Version and patches
The source is unmodified 6.18.60 (output/build/linux-6.18.60/Makefile VERSION/PATCHLEVEL/SUBLEVEL) and both changed functions still contain the pre-fix code, so the fix is not in this tree. No entry in .applied_patches_list backports it. I could not read the upstream fix commits (8d85d6bc9c46, 9fa903b24b1f) or the CNA affected range from this offline tree, so the first fixed 6.18.y release is not established here.
Recommendation
Document as not exposed in this configuration; no urgent backport is needed. Pick up the fix through the next routine 6.18.y stable bump that contains it.
Re-triage this CVE if CONFIG_XFRM_USER, CONFIG_NET_KEY or any IPsec feature is ever enabled in board/aarch64/linux_defconfig. With CONFIG_USER_NS=y and CONFIG_NET_NS=y already set, enabling CONFIG_XFRM_USER would make this reachable by an unprivileged local user.
Open questions
The exact upstream affected range and first fixed 6.18.y version could not be confirmed offline.
This review covers only the aarch64_minimal_defconfig build with board/aarch64/linux_defconfig; other Infix board kernel configs may enable CONFIG_XFRM_USER and were not checked.
Two of my searches were blocked by the sandbox because they used a compound cd … && grep form; I re-ran equivalent searches with paths from the tree root, so no evidence is missing.
Members of Kernel Kit decide. Sign in if you are one.