DLCI array access lacks local bounds check β ng7 twin of DF-0556
Summary
ng7 twin of DF-0556. nglmi_rcvdata DLCI IE handler segsize==6 GROUP4: dlci=(data[2]<<8)|data[3] yields 0-65535(:690-691). Empty if(dlci<1024&&dlci>0) with XXX comment(:692/699). Falls through to sc->dlci_state[dlci] read(:709) write(:716). dlci_state[MAXDLCI+1=1024]. Safety entirely depends on nglmi_checkdata rejecting dlci>1023(:962). Print path(:977-980) returns 1(accept) bypassing some IE-ordering checks. Fix: if(dlci>MAXDLCI) goto nextIE in rcvdata.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-0564 Β· 5 files| File | Type | Description | Size | |
|---|---|---|---|---|
| fix.diff | suggested-fix | Bounds-check dlci against MAXDLCI before indexing. | 348 B | view raw |
| VERDICT.md | verdict | source-confirmation + fix | 1008 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-0564 β Low-severity source-confirmation
Verdict: REPRODUCED
Impact: panic Confidence: likely
Kernel ref: netgraph7/lmi/ng_lmi.c:690
Mechanism / why
Source-confirmed: ng7 nglmi DLCI IE (case 6) computes dlci 0..65535 then indexes dlci_state[dlci] (size 1024) -> OOB. netgraph7/lmi module.
Recommended fix
Bounds-check dlci against MAXDLCI before indexing.
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).
A standalone git apply-able fix.diff is in this folder.
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
- n
- e
- t
- g
- r
- a
- p
- h
- 7
- /
- l
- m
- i
- /
- n
- g
- _
- l
- m
- i
- .
- c
- :
- 6
- 9
- 0
Detail
Exploit chain
none (Low-severity panic; source-only confirmation)
Evidence (decisive lines)
DF-0564 [REPRODUCED] - netgraph7/lmi/ng_lmi.c:690
PoC changes
fix.diff present in findings/poc/DF-0564/; batched into ../_batch_low/combined_all.patch
Verified recommended fix
Bounds-check dlci against MAXDLCI before indexing.
Verdict
Source-confirmed: ng7 nglmi DLCI IE (case 6) computes dlci 0..65535 then indexes dlci_state[dlci] (size 1024) -> OOB. netgraph7/lmi module.
No comments yet.