aboutsummaryrefslogtreecommitdiff
path: root/contrib/nvi/ex/ex_append.c
diff options
context:
space:
mode:
authorAndrew Griffiths <andrew@calif.io>2026-08-20 14:30:03 +0000
committerMark Johnston <markj@FreeBSD.org>2026-08-20 14:30:03 +0000
commit81a67bfebc60055bbf19ce6e39537fb5f53eeee5 (patch)
treeee43a9f98ba757a9fcec10ca7b1ac19e7a7bb993 /contrib/nvi/ex/ex_append.c
parent7e9e72bee359437b9f78c6a4056ef0a90337f341 (diff)
rsu: add a runtime TX buffer bound check for a kernel buffer overflowHEADmain
The rsu driver currently relies on a `KASSERT` to prove that the mbuf payload plus TX descriptor fits in the per-transfer USB TX buffer. On production kernels without `INVARIANTS`, an oversized raw 802.11 frame can reach `m_copydata()` and overwrite past that buffer, causing local kernel memory corruption. This suggested patch replaces the assertion-only guard with a runtime size check before the copy. Oversized frames return `EMSGSIZE`, leaving the existing caller cleanup paths responsible for freeing `m0`, `ni`, and the unused transfer buffer. Reachable via root / bpf access Reviewed by: bz, adrian MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D58898
Diffstat (limited to 'contrib/nvi/ex/ex_append.c')
0 files changed, 0 insertions, 0 deletions