Reproduction and exploit for a Linux TIPC double-free (CVE-2026-52993): remote and local KASAN triggers plus a working uid-1000-to-root privilege escalation chain.
Double-free / slab-use-after-free in the Linux kernel TIPC fragment
reassembly path, tipc_buf_append() in net/tipc/msg.c.
| Component | net/tipc/msg.c — tipc_buf_append() / tipc_msg_validate() |
| Class | CWE-415 double free (manifests as slab-use-after-free) |
| Type | Double free (CWE-415), manifests as slab-use-after-free |
| CVSS (Linux CNA) | 9.8 CRITICAL AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (remote); locally reachable too |
| Introduced | d618d09a68e4 (v4.15) |
| Fixed | d293ca716e7d mainline |
| Fixed in (stable) | 5.10.258, 5.15.209, 6.1.175, 6.6.141, 6.12.91, 6.18.33, 7.0.10, 7.1 |
| Vulnerable in this repro | linux 6.6.140 (last 6.6.y without the fix) |
| Fixed control | linux 6.6.141 |
The bug is reachable two ways and both are demonstrated against the vulnerable kernel, with the fixed kernel as identical-attack control:
| Topology | 6.6.140 (vulnerable) | 6.6.141 (fixed) |
|---|---|---|
Remote: attacker guest → victim guest over a virtual wire; attacker runs no TIPC, no credentials, fakepeer as uid 1000 CapEff=0, plain UDP | BUG: KASAN: slab-use-after-free in kfree_skb_reason ← tipc_buf_append, fired in the victim's receive softirq (by task swapper/1/0, <IRQ>) | clean — same handshake (DSC_RESP + RESET) and 12×128 fragments delivered, no report |
Local: two netns joined by veth, AF_PACKET inject (trigger.sh) | same KASAN report | clean |
The remote row is the exploitability proof: two QEMU guests that share nothing
but a virtual Ethernet wire. The attacker guest has a fully patched kernel
(6.6.141 — the attacker machine is irrelevant to the bug), configures no TIPC
(no node address, no bearer), holds no account or capability, and speaks no TIPC
stack: every attack byte is produced by a userspace UDP socket
(harness/fakepeer.c) run under /dropuid 1000 1000.
Evidence logs:
logs/remote-6.6.140-vuln-victim.log / logs/remote-6.6.140-vuln-attacker.log — the remote trigger, vulnerable kernellogs/remote-6.6.141-fixed-victim.log / logs/remote-6.6.141-fixed-attacker.log — identical attack, fixed kernel, no reportlogs/local-6.6.140-vuln.log / logs/local-6.6.141-fixed.log — single-VM local repro + controllogs/remote-unauth-6.6.140.log, logs/remote-unauth-6.6.141-fixed.log — single-VM netns variant of the unauthenticated attacklogs/SUCCESS-instrumented-6.6.140.log — temporary TIPC debug pr_infos showing the reassembly ratioslogs/remote-diag-6.6.140-victim.log — packet-delivery counters used to chase the e1000 quirk (below)Attacker side of the remote run (logs/remote-6.6.140-vuln-attacker.log):
=== attacker: the attack runs uid 1000, CapEff=0 ===
Uid: 1000 1000 1000 1000
CapEff: 0000000000000000
fakepeer: NO tipc, NO caps. uid=1000 victim=10.10.0.2:6118 me=10.10.0.1:6118 claiming tipc addr 0x01001001
fakepeer: <- frame len=56 user=7(LINK_PROTOCOL) type=1 prevnode=0x01001002 (link up)
fakepeer: sent 128 fragments (activate + frags over plain UDP)
Victim side (logs/remote-6.6.140-vuln-victim.log) — the corruption is
attributed to the wire (receive softirq), not to any local task:
BUG: KASAN: slab-use-after-free in kfree_skb_reason+0x2f/0x2d0
Read of size 4 at addr ffff888009ee9d14 by task swapper/1/0
...
Call Trace:
<IRQ>
kfree_skb_reason
tipc_buf_append
tipc_link_input
tipc_link_rcv
tipc_rcv
...
The buggy address belongs to the object at ffff888009ee9c40
which belongs to the cache skbuff_head_cache of size 224
The buggy address is located 212 bytes inside of
freed 224-byte region [ffff888009ee9c40, ffff888009ee9d20)
The read at +212 is sk_buff->users: the second kfree_skb() on the
already-freed reassembled head — exactly the double free the fix closes.
The local runs produce the same report with the inject/trigger.sh path
(KASAN stacks in logs/local-6.6.140-vuln.log).
The instrumentation run proves the trigger clears the reallocation gate on this path:
TIPCDBG buf_append LAST head=... len=3328 truesize=111360 roundup=4096 ratio=27
ratio=27 is well over the >= 4 threshold, so tipc_msg_validate() performs
the reallocation/free and the vulnerable err: path then touches the freed
skb.
tipc_msg_validate(&head) may reallocate the skb it is handed and free the old
one. Inside tipc_buf_append() the argument was the local copy head, not
the caller's *headbuf. If the reallocation happens and validation then fails,
the err: path frees *headbuf — still pointing at the old, already-freed
skb. One object, freed twice (the appended fragments hang off the head's
frag_list and are released through it):
if (fragid == LAST_FRAGMENT) {
TIPC_SKB_CB(head)->validated = 0;
if (unlikely(!tipc_msg_validate(&head))) /* &head: local copy! */
goto err;
...
}
err:
kfree_skb(*buf); /* NULL at this point */
kfree_skb(*headbuf); /* already freed by the validate() reallocation */
The fix propagates the new pointer back:
if (unlikely(!tipc_msg_validate(&head))) {
if (head != *headbuf)
*headbuf = head;
goto err;
}
Reallocation is gated by skb->truesize / buf_roundup_len(skb->len) >= 4, and
the failure afterwards is any ordinary validation failure. The trigger:
seqno == rcv_nxt), andThe victim's skb is tipc_buf_acquire()-style: a small linear head with a large
truesize (SKB_TRUESIZE overhead) for a tiny len. Adding the tiny received
fragments as page frags makes truesize grow while buf_roundup_len() stays
pinned at its 1024 floor, so the ratio climbs linearly with the fragment count.
fakepeer.c/inject.c send 128 fragments of 50 bytes on the wire (26-byte
payload) with the inner header of the first fragment carrying version = 1
instead of TIPC_VERSION = 2, so validation fails right after the reallocation.
+-----------------+ QEMU socket netdev +------------------+
| attacker guest | ======== virtual Ethernet =======> | victim guest |
| 10.10.0.1 | (127.0.0.1:<port>) | 10.10.0.2 |
| | | |
| kernel 6.6.141 | | kernel 6.6.140 |
| (fixed) | | (vulnerable) |
| NO TIPC config | -- LINK_CONFIG DSC_REQ --------> | tipc node 1.1.2 |
| fakepeer | -- LINK_PROTOCOL ACTIVATE -----> | udp bearer u0 |
| uid 1000 | -- MSG_FRAGMENTER × 128 -------> | :6118 |
| CapEff=0 | <- DSC_RESP / RESET ----------- | |
+-----------------+ +------------------+
harness/run-remote.sh boots both guests on a QEMU socket netdev pair (a
virtual Ethernet cable between two QEMU processes; no privileges needed on the
host) and runs harness/fakepeer.c on the attacker side. fakepeer speaks just
enough of the TIPC wire protocol over plain UDP:
tipc_node_check_dest); unauthenticated
by design ("legacy peers" need no key),tipc_link_proto_rcv run),truesize/buf_roundup_len past 4, with a bogus inner header so
tipc_msg_validate() fails right after it freed the old skb → double free
in tipc_buf_append().