Description
In the Linux kernel, the following vulnerability has been resolved:
netdevsim: reject cls_bpf programs bound to another device
The issue:
nsim_bpf_setup_tc_block_cb() installs any device-bound SCHED_CLS program
without checking that its offload device matches the target netdev. The
core cls_bpf attach path rejects a mismatching program, but a netdev that
joins a shared block later is replayed the stored filter by
cls_bpf_reoffload() before it is inserted into block->ports, so the
attach-time check cannot see it. The driver callback is the
authoritative per-device acceptance boundary and must enforce the match
itself, as nfp already does in nfp_net_bpf_offload().
Without the check, replaying a device-bound program onto a different
bpf_offload_dev installs it into that device's netdevsim state, which
trips the WARN in nsim_bpf_uninit() (ns->bpf_offloaded set on a foreign
device) and can dereference a NULL prog->aux->offload in
nsim_prog_set_loaded().
The Fix:
Reject a device-bound program whose offload device does not match the
target netdev, with -EINVAL and an extack so the rejected replay is not
silent. The check is intentionally narrower than nfp's: it fires only
for a dev-bound program, so nsim's bpf_tc_non_bound_accept mode (which
admits an unbound program onto the device) is unaffected. Teardown is
never blocked: the guard is on the program being installed and an unbind
passes cls_bpf.prog = NULL.
Conditions to recreate the bug:
- CONFIG_NETDEVSIM=y, CONFIG_NET_CLS_BPF=y
- load and pin a dev-bound SCHED_CLS program for netdevsim device B
- install the program on a shared block owned by B
- add an independently backed netdevsim device C to that block; the
bind replays the filter to C's callback, and C's
ports/0/bpf_offloaded_id takes the B-bound program id.
The reported Sashiko review is at
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260809094418.901607-1-jhs@mojatatu.com
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 31d3ad832948c75139b0e5b653912f7898a1d5d5 <dcc30b18a028cce7679cbcbb49c72921f8f5d52a | — |
| Linux | Linux | patch: 5.15.226 | — |
| Linux | Linux | 31d3ad832948c75139b0e5b653912f7898a1d5d5 <40a0adc98895d09b42d9bb9f835f6dff2f33c4e3 | — |
| Linux | Linux | 31d3ad832948c75139b0e5b653912f7898a1d5d5 <c59b5fcbc7b777bcf89a976af57f52a95ba42b6f | — |
| Linux | Linux | 31d3ad832948c75139b0e5b653912f7898a1d5d5 <6f5e04e73f60e122b1a9ff20256a74617f8954dc | — |
| Linux | Linux | patch: 6.18.63 | — |
| Linux | Linux | patch: 6.12.117 | — |
| Linux | Linux | patch: 0 | — |
| Linux | Linux | 31d3ad832948c75139b0e5b653912f7898a1d5d5 <5820ca58b409402505b9e904d1ded4908e0b6b81 | — |
| Linux | Linux | patch: 6.6.163 | — |
| Linux | Linux | 4.16 | — |
| Linux | Linux | patch: 5.10.275 | — |
| Linux | Linux | patch: 7.3.4 | — |
| Linux | Linux | 31d3ad832948c75139b0e5b653912f7898a1d5d5 <349f1e431d03a97e9bd160429fd0fe0a67a063b0 | — |
| Linux | Linux | 31d3ad832948c75139b0e5b653912f7898a1d5d5 <16ec59a2a59a1beda422c24f33bba5b09ac1a36c | — |
| Linux | Linux | 31d3ad832948c75139b0e5b653912f7898a1d5d5 <6b48deba1968a573eba8a26981c8431366779518 | — |
| Linux | Linux | patch: 6.1.193 | — |
| Linux | Linux | patch: 7.4-rc1 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 7.3.4-1 | — |
| Debian 13 | linux | 6.12.117-1 | — |
| Debian 12 | linux | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Nvidia-BlueField 24.04 LTS | linux-bluefield | No fix yet | — |
| Ubuntu Nvidia-BlueField 22.04 LTS | linux-bluefield | No fix yet | — |
| Ubuntu 26.10 | linux +8 | No fix yet | — |
| Ubuntu 26.04 LTS | linux +14 | No fix yet | — |
| Ubuntu 24.04 LTS | linux +52 | No fix yet | — |
Show 19 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | linux +59 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gke +28 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime +3 | No fix yet | — |
| Ubuntu Pro Realtime 22.04 LTS | linux-realtime +2 | No fix yet | — |
| Ubuntu Pro FIPS 20.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS 18.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS 16.04 LTS | linux-fips | No fix yet | — |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS-updates 16.04 LTS | linux-fips | No fix yet | — |
| Ubuntu Pro FIPS-preview 22.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro 20.04 LTS | linux +21 | No fix yet | — |
| Ubuntu Pro 18.04 LTS | linux +12 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | linux +7 | No fix yet | — |
| Ubuntu Pro 14.04 LTS | linux +3 | No fix yet | — |
Advisories 1
- WID-SEC-2026-4889 Linux Kernel: Mehrere Schwachstellen ermöglichen nicht spezifizierten Angriff BSI CERT-Bund (WID) · Nov 30, 2026
References
- https://git.kernel.org/stable/c/40a0adc98895d09b42d9bb9f835f6dff2f33c4e3
- https://git.kernel.org/stable/c/dcc30b18a028cce7679cbcbb49c72921f8f5d52a
- https://git.kernel.org/stable/c/349f1e431d03a97e9bd160429fd0fe0a67a063b0
- https://git.kernel.org/stable/c/6f5e04e73f60e122b1a9ff20256a74617f8954dc
- https://git.kernel.org/stable/c/16ec59a2a59a1beda422c24f33bba5b09ac1a36c
- https://git.kernel.org/stable/c/c59b5fcbc7b777bcf89a976af57f52a95ba42b6f
- https://git.kernel.org/stable/c/6b48deba1968a573eba8a26981c8431366779518
- https://git.kernel.org/stable/c/5820ca58b409402505b9e904d1ded4908e0b6b81