CVE-2026-139180: pppoe: wait for RCU readers before reusing a socket
In the Linux kernel, the following vulnerability has been resolved:
pppoe: wait for RCU readers before reusing a socket
When pppoeconnect() disconnects or reuses a socket, it removes the old session from the hash table and resets the socket's fields. An RCU reader that reached the entry before it was unlinked can still be using its address, ifindex or next pointer.
If sockets A and B share a hash bucket with A preceding B, a concurrent getitem() looking for B can be traversing A when it is removed. Clearing A->next then makes the lookup miss B and drop the packet. Reinserting A can similarly redirect the reader into another hash chain.
Call synchronizenet() after unlinking the old session and before clearing its fields. This allows existing receive-path and /proc/net/pppoe readers to finish before the socket is cleared or reused.
This was found by Sashiko's static analysis, and reproduced on a VM stress test with KCSAN.
BUG: KCSAN: data-race in hashitem+0x1c/0x60
race at unknown origin, with read to 0xffff888000a1c566 of 2 bytes by task 147 on cpu 2: hashitem+0x1c/0x60 pppoeseqnext+0x112/0x1b0 seqreaditer+0x595/0x700 seqread+0xb0/0xe0 procregread+0xd0/0xf0 vfsread+0xbd/0x220 ksysread+0xa9/0x100 x64sysread+0x47/0x60 x64syscall+0x98/0x1fd0 dosyscall64+0x5b/0x260 entrySYSCALL64afterhwframe+0x4b/0x53
value changed: 0x0002 -> 0x0000
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the PPPoE socket reuse/disconnect path, call synchronize_net() after unlinking the old session and before clearing or reusing the socket.
Event History
Frequently Asked Questions
What concurrent activity is required to trigger the race?
A PPPoE socket must be disconnected or reused while an RCU reader is still traversing the old session entry. The affected readers include the receive path and readers of /proc/net/pppoe.
What effect can the race have on PPPoE traffic?
If a reader is traversing one socket while it is removed and its next pointer is cleared, it can miss a subsequent socket in the same hash bucket and drop the packet. Reusing and reinserting the socket can also redirect a reader into a different hash chain.
What change addresses the issue?
The resolved code waits with synchronize_net() after unlinking the old PPPoE session and before clearing or reusing its socket fields. This allows existing RCU readers to finish using the old entry first.