am79900_start_locked feeds unbounded mbuf chains into lance_put, which memcpy's them into a fixed LEBLEN(1522)-byte TX buffer slot with no length clamp
Summary
lance_put walks the whole chain copying m->m_len at advancing offsets into the per-slot TX buffer; nothing bounds the total to LEBLEN(1522) - a longer chain overruns the slot and, from the last slot, the 32K bus_dmamem region. Unpriv reachability closed (ether_ioctl caps MTU at ETHERMTU; VLAN ~1518; remaining vector is root-only BPF write). Hardening: one-line pkthdr.len guard at dequeue. Twin in am7990.c. [VERIFIED pass2: lance_put walks unbounded chains into the 1522-byte TX slot; no LANCE NIC in QEMU; pkthdr drop guard compiled at both sites]
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-4746 Β· 4 files| File | Type | Description | Size | |
|---|---|---|---|---|
| README.md | β | 236 B | β raw | |
| fix.diff | β | 976 B | view raw | |
| manifest.json | β | 394 B | view raw | |
| verdict.json | β | 1.7 KB | view raw |
DF-4746 evidence pack
What
am79900_start_locked feeds unbounded mbuf chains into lance_put
Verdict
status=not_reproduced impact=none confidence=certain
See VERDICT.md for the full narrative and fix.diff for the verified fix.
Fix verification
not_testablefix.diff applied in the F40FIX verification kernel build (RC=0, zero -Werror errors); no runtime A/B for this item (line-certain hardening)
Confirmed kernel references
Detail
Evidence (decisive lines)
VERDICT.md with path:line citations; run.log where a live demo exists; fix.diff
PoC changes
n/a - no lnc hardware in QEMU
Verified recommended fix
drop chains with pkthdr.len > LEBLEN - ETHER_CRC_LEN before lance_put (am79900 + am7990)
Verdict
Line-accurate confirmation; runtime demonstration not possible on this guest (no LANCE/PCnet NIC in QEMU; the lnc driver is compiled into X86_64_GENERIC as device lnc0 but never attaches). lance_put (lance.c:309-326) walks the whole chain copying m->m_len at advancing offsets into a fixed LEBLEN(1522)-byte TX slot with no total bound; am79900.c:560 / am7990.c:523 feed it directly from ifq_dequeue. Unprivileged reachability is closed today (ether_ioctl caps MTU at ETHERMTU; remaining vector is root-only BPF writes). Fix adds a pkthdr.len > LEBLEN - ETHER_CRC_LEN drop guard at both dequeue sites; both files compiled in the F40FIX build (lnc in kernel).
No comments yet.