⬢ DragonFlyBSD Kernel Audit
DF-2327 / run.log
← back to finding ↓ download raw
DF-2327 NULL+1 panic (BUSAUDIT kernel, fresh boot, first armed test)
====================================================================
# kldload ppbharness3.ko; sysctl hw.ppbx3.test=1
console:
PPBX3: arming DF-2327 (MFG;MFG -- no colon) attach NOW; expect Fatal trap 12
  at kprintf-via-NULL+1
ppbus0: <Parallel port bus> on ppc0.
ppbus0: IEEE1284 device found /NIBBLE
ppb: <PnP> 7 characters: M(0x4d) F(0x46) G(0x47) ;(0x3b) M(0x4d) F(0x46) G(0x47)
ppbus0: <panic with 1 spinlocks held
panic: page fault.
cpuid = 5.
--- trap 000000000000000c, rip = ffffffff809d8f70 ... ---
strlen() at strlen
kprintf() at kprintf+0x73
<dump>

Mechanism: ppbconf.c:236-237 turns "MFG;MFG" into "MFG\0MFG\0";
search_token(str,len,"MFG") matches at 0;
search_token(str, UNKNOWN_LENGTH, ":") scans "MFG", hits the NUL, returns
NULL; ppbconf.c:242 computes NULL+1 and kprintf("%s", (char*)0x1) faults
in strlen().  Guest died in DDB/dump.