CVE-2026-139189: net/sched: taprio: unwind the netdevice notifier if register_qdisc() fails
In the Linux kernel, the following vulnerability has been resolved:
net/sched: taprio: unwind the netdevice notifier if registerqdisc() fails
tapriomoduleinit() registers tapriodevicenotifier and then returns registerqdisc()'s error directly. When registerqdisc() fails the notifier stays registered, but the loader's failure path frees the module image without ever calling the exit function, so netdevchain is left pointing at tapriodevicenotifier.notifiercall -- a function pointer that lives in text that has just been freed.
registerqdisc() has two failure returns: -EEXIST (duplicate .id) and -EINVAL (malformed clops). taprioclassops satisfies every checked implication, so -EINVAL is unreachable and -EEXIST is the only reachable failure; it needs a pre-existing "taprio" entry in qdiscbase. In-tree that is reachable only through bpfqdiscreg() (CONFIGNETSCHBPF); a module calling the exported registerqdisc() reaches it as well.
Once the notifier is left dangling, the next netdevice event that walks netdevchain calls through the stale pointer:
BUG: KASAN: vmalloc-out-of-bounds in notifiercallchain+0x650/0xb5c Read of size 8 at addr ffff80001fc5ab08 by task ip/110 notifiercallchain+0x650/0xb5c rawnotifiercallchain+0x34/0x64 callnetdevicenotifiersinfo+0xa8/0x198 devclosemany+0xe0/0x800 ... >ffff80001fc5ab00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
The shadow row is all f8 (KASANVMALLOCINVALID): the read lands in vmalloc memory that was poisoned when the module image was freed, and the indirect call is unguarded because the only check, funcptriskerneltext(), is compiled out unless CONFIGDEBUGNOTIFIERS.
Mirror the sibling schcbs.c and actmirred.c, which unwind the notifier on this failure path.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Unregister the taprio netdevice notifier if register_qdisc() fails.