โฌข DragonFlyBSD Kernel Audit
DF-3223 / run.log
โ† back to finding โ†“ download raw
# DF-3223 baseline run 1 of 3 (stock kernel #0 Jul 2 06:02:54, INVARIANTS guest)
#
# setup: 10G sparse image -> newfs_hammer (v7, iscsi crc) -> mount -> f1 -> synctid
#        -> umount -> ./patch_inode (live inode leaf objid=000000010000051d
#        loc=00000001 data_off=9000000021800250 data_len=128 -> 0, node crc fixed)
#        -> vnconfig + mount -t hammer (RW) -> ./trigger_prune /mnt
$ ./trigger_prune /mnt
trigger: HAMMERIOC_PRUNE (PRUNE_ALL, full range) on /mnt uid=0
[ssh session dies โ€” guest panics]

$ dfbsd-qemu/vm.sh status
down

$ dfbsd-qemu/vm.sh log   (serial console โ€” full text in panic.txt)
Fatal user address access from kernel mode from trigger_prune at ffffffff8094bd5f

Fatal trap 12: page fault while in kernel mode
cpuid = 0; lapic id = 0
fault virtual address	= 0x48
fault code		= supervisor read data, page not present
instruction pointer	= 0x8:0xffffffff8094bd5f
stack pointer	        = 0x10:0xfffff80117bbf318
frame pointer	        = 0x10:0xfffff80117bbf478
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, long 0, def32 0, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 917
kernel: type 12 trap, code=0
CPU0 stopping CPUs: 0x0000003e
 stopped
Stopped at      hammer_ioc_prune+0x37f: cmpq    $0,0x48(%rax)
db>

# The faulting instruction is the compiled `cursor->data->inode.nlinks'
# read (nlinks at offset 0x48 of struct hammer_inode_data) with
# cursor->data == NULL โ€” exactly hammer_prune.c:332.