β¬’ DragonFlyBSD Kernel Audit
← triage Β· dashboard
DF-5503

ioapic.c parameter-validation gap cluster: containment-defeating overlap test, npin<=0 acceptance, negative-pin acceptance in ioapic_gsi(), and completely unvalidated pin/select in ioapic_pin_prog() (the sink of the ABI entry points DF-5351/5352 proved callable on production kernels)

Summary

The overlap test checks only endpoint membership - a new range fully containing an existing one passes both disjuncts and registers nested GSI spaces (misrouting all contained GSIs to the outer controller); npin<=0 accepted; ioapic_gsi checks only the upper bound; pin_prog computes the REDTBL select from pin with NO bounds at all - the in-file sink for the MachIntrABI entry points DF-5351/5352 proved reachable from KLD with no runtime checks anywhere. MMIO-window addressing keeps it undefined-register programming rather than kernel-memory corruption. Sub-issues 1+2 closed by the validated DF-5502 fix; add pin bounds to gsi()/pin_prog.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-5503 Β· 1 files
FileTypeDescriptionSize
verdict.json file 977 B view raw

Fix verification

not_testable
baseline no→ patch + rebuild →patched clean
per-fix-DF-5503

Confirmed kernel references

Detail

Evidence (decisive lines)

arithmetic proof vs ioapic.c:236-239 in finding markdown

Verified recommended fix

see finding markdown + DF-5502 fix.diff

Verdict

untested (Low hardening; arithmetic-certain containment bypass; sub-issues 1+2 closed by DF-5502 fix)