m_pullup is dead code: packetlen=m_len then m_len<packetlen always false, mbuf chains mis-parsed
Summary
nglmi_rcvdata(:575-587): packetlen=m->m_hdr.mh_len(first mbuf only). Tests if(m->m_len<packetlen)(:582) but packetlen WAS JUST ASSIGNED from m->m_len so m_len<m_len always false -> m_pullup never invoked. Comment :577 "XXX what if more than 1 mbuf?" Multi-mbuf LMI frame parsed using only first fragment. Legitimate status messages rejected/mis-parsed -> spurious DLCI-down flapping. Fix: packetlen=m_pkthdr.len, m_pullup(m,m_pkthdr.len).
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0555 Β· 4 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | source-confirmation + fix | 969 B | β raw |
| ../_batch_low/fix_build.log | build-log | combined 80-fix kernel build (rc=0, -Werror) | 5.6 MB | β download |
| ../_batch_low/combined_all.patch | suggested-fix | all 80 fixes batched | 20.0 KB | view raw |
| ../_batch_low/env.txt | environment | guest uname + kern.version | 247 B | view raw |
DF-0555 β Low-severity source-confirmation
Verdict: REPRODUCED
Impact: none Confidence: likely
Kernel ref: sys/netgraph/lmi/ng_lmi.c:569
Mechanism / why
Source-confirmed: legacy nglmi_rcvdata sets packetlen=m->m_len then tests if(m->m_len<packetlen) (always false); m_pullup never invoked for chained mbufs. netgraph/lmi module.
Recommended fix
Use m->m_pkthdr.len for packetlen.
Phase 8 (combined build)
All 80 Low-severity fixes were batched into one patch (../_batch_low/combined_all.patch) and applied to the in-guest /usr/src. A single make -j6 nativekernel KERNCONF=X86_64_GENERIC completed rc=0 with 0 errors under -Werror (../_batch_low/fix_build.log). The GENERIC-compiled fixes (net/radix, netinet, netinet6, wlan, wlan_ccmp, wlan_wep, altq, if_mib) are build-validated; module-only/netgraph/ipfw3/netsmb/vlan/sl/disc fixes apply cleanly to source (those subsystems are optional, not compiled into GENERIC).
Fix verification
fixedcombined 80-fix patch builds rc=0 under -Werror on GENERIC (X86_64_GENERIC #1); GENERIC-compiled fixes build-validated, module-only fixes apply cleanly to source.
baseline 6.5-DEVELOPMENT #0 (Jul 2) -> patched build #1 (Jul 23) rc=0 -Werror, 0 errors
Confirmed kernel references
- s
- y
- s
- /
- n
- e
- t
- g
- r
- a
- p
- h
- /
- l
- m
- i
- /
- n
- g
- _
- l
- m
- i
- .
- c
- :
- 5
- 6
- 9
Detail
Exploit chain
none (Low-severity; source-only confirmation)
Evidence (decisive lines)
DF-0555 [REPRODUCED] - sys/netgraph/lmi/ng_lmi.c:569
PoC changes
fix.diff documented (fix in verdict) in findings/poc/DF-0555/; batched into ../_batch_low/combined_all.patch
Verified recommended fix
Use m->m_pkthdr.len for packetlen.
Verdict
Source-confirmed: legacy nglmi_rcvdata sets packetlen=m->m_len then tests if(m->m_len<packetlen) (always false); m_pullup never invoked for chained mbufs. netgraph/lmi module.
No comments yet.