CVE-2026-72385: tracing/fprobe: Fix NULL pointer dereference in fprobe_fgraph_entry()
In the Linux kernel, the following vulnerability has been resolved:
tracing/fprobe: Fix NULL pointer dereference in fprobefgraphentry()
fprobefgraphentry() sizes a shadow-stack reservation in one walk of the per-ip fprobe list and fills it in a second walk, both under rcureadlock() only. A fprobe registered on an already-live ip can become visible between the two walks, so the fill walk processes an exithandler the sizing walk did not count and used runs past reservedwords. If the sizing walk counted nothing, fgraphdata is NULL and the first writefprobeheader() faults:
Oops: general protection fault, probably for non-canonical address ... KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] RIP: 0010:fprobefgraphentry+0xa38/0xf10 kernel/trace/fprobe.c:167 Call Trace: <TASK> functiongraphenterregs+0x44c/0xa10 kernel/trace/fgraph.c:677 ftracegraphfunc+0xc5/0x140 arch/x86/kernel/ftrace.c:671 kerneltextaddress+0x9/0x40 kernel/extable.c:78 archstackwalk+0x117/0x170 arch/x86/kernel/stacktrace.c:26 kmemcachefree+0x188/0x580 mm/slub.c:6378 tcpdataqueue+0x18d/0x6550 net/ipv4/tcpinput.c:5590 [...] </TASK>
The list cannot be frozen across the two walks, so skip a node that does not fit the reservation and count it as missed.