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

cpu_id_to_apic_id[] lacks the -1 sentinel its sibling gets: lapic_config() initializes only apic_id_to_cpu_id[], so any unassigned forward mapping silently aliases APIC ID 0 (the BSP) β€” INIT/SIPI redirected at the running BSP

Summary

The reverse map gets -1 sentinels; the forward map stays BSS-zero so unassigned cpuids alias APIC ID 0 - start_ap does CPUID_TO_APICID(cpuid) with no sentinel check and sends INIT+SIPI to the BSP itself (reset/boot-loop), or a woken duplicate trips the cpuid-mismatch panic. Real holes reachable via the mptable HT-fixup path advancing arg->cpu for rejected synthetic entries (the DF-5343 territory); MADT assigns densely. Boot-time firmware-gated DoS. Sentinel-init + reject-at-IPI fix.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-5366 Β· 1 files
FileTypeDescriptionSize
verdict.json file 1.0 KB view raw

Fix verification

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

Confirmed kernel references

Detail

Evidence (decisive lines)

static chain mptable.c:705-709 -> lapic.c zero map -> mp_machdep.c:693 -> seticr to APIC 0

Verified recommended fix

sentinel-init both maps + skip -1 at the IPI boundary

Verdict

untested (Low; sparse MP-table crafting needs patched firmware the QEMU rig cannot inject)