ISP_FC_GETDINFO ioctl missing bounds check on ifc->chan -> OOB fcparam read
Summary
ISP_FC_GETDINFO at isp_freebsd.c:479-489 validates ifc->loopid<MAX_FC_TARG but NOT ifc->chan<isp->isp_nchan before indexing FCPARAM(isp,ifc->chan)->portdb[loopid]. FCPARAM expands to &((fcparam*)isp_param)[chan]; isp_param allocated for isp_nchan entries. chan is 6-bit field (0..63). Single-channel HBA (isp_nchan=1): chan>=1 reads kilobytes past allocation into kernel heap. Conditional copy-back of role/handle/portid/node_wwn/port_wwn to userland if OOB state bits match. Root-only (/dev/ispN mode 0600). Same class as DF-1052 (sense OOB) family. Fix: add chan<isp->isp_nchan check matching ISP_FC_GETHINFO at :535.
Discussion (0)
PoC verification
Evidence pack
findings/poc/DF-1156 Β· 3 files| File | Type | Description | Size | |
|---|---|---|---|---|
| VERDICT.md | verdict | Source-confirmation verdict for DF-1156 | 622 B | β raw |
| fix.diff | suggested-fix | Validate ifc->chan<isp_nchan before FCPARAM index | 345 B | view raw |
| ../fix_build.log | build-log | Batch kernel build log (all fixes, rc=0) | 5.6 MB | β download |
DF-1156 Verification Verdict
Severity: Low Impact class: oob_read Verification method: Source-only confirmation (HW-gated, not triggerable on QEMU guest)
Verdict: REPRODUCED (source-confirmed)
The bug is confirmed in the audited source at the cited path:line. Triggerable but requires specific driver/config.
Fix: Validate ifc->chan<isp_nchan before FCPARAM index
Fix applied and validated in batch kernel build (rc=0, -Werror).
Fix validation
All 41-fix patches batched into single make -j6 nativekernel KERNCONF=X86_64_GENERIC build.
Build result: rc=0, 0 errors (full -Werror clean).
Fix verification
fixedVALIDATED: fix.diff applies cleanly + batch kernel build rc=0 -Werror; bug HW/module/runtime-gated, no runtime PoC re-test possible on guest.
VALIDATED: fix.diff applies cleanly + batch kernel build rc=0 -Werror; bug HW/module/runtime-gated, no runtime PoC re-test possible on guest.
Confirmed kernel references
β
Detail
Exploit chain
none
Evidence (decisive lines)
REPRODUCED (source-only): ISP_FC_GETDINFO validates ifc->loopid<MAX_FC_TARG but NOT ifc->chan<isp->isp_nchan before indexing FCPARAM(isp,ifc->chan)->portdb[loopid]. OOB.
Verified recommended fix
REPRODUCED (source-only): ISP_FC_GETDINFO validates ifc->loopid
Verdict
REPRODUCED (source-only): ISP_FC_GETDINFO validates ifc->loopid
No comments yet.