CVE-2026-74736: net/sched: cls_bpf: reject dev-bound programs bound to a different device
In the Linux kernel, the following vulnerability has been resolved:
net/sched: clsbpf: reject dev-bound programs bound to a different device
clsbpfprogfromefd() obtained a SCHEDCLS program via bpfproggettypedev() but never verified that a device-bound (offloaded) program's bound netdev matches the TC netdev the classifier is being attached to. This let a program loaded with progifindex for device A be attached via clsbpf + skipsw to device B; deleting device A then destroyed the program's offload state while it was still attached to device B, triggering a netdevsim WARN (panic with paniconwarn=1).
Mirror the XDP attach path (net/core/dev.c) and reject the attach with -EINVAL when a dev-bound program's bound device does not match the target device.
Affected Software
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
An attacker or local user must be able to load a device-bound SCHED_CLS BPF program for one network device, attach it to a different TC network device using cls_bpf with skip_sw, and then delete the originally bound device.
What is the observable impact?
Deleting the original device destroys the program's offload state while the program remains attached to the other device. This triggers a netdevsim WARN and can cause a kernel panic when panic_on_warn=1.
How does the fix change behavior?
The kernel now rejects the attachment with -EINVAL when a device-bound program's bound network device differs from the TC device receiving the classifier.