DF-0070 / build.log
=== DF-0070 build.log (final successful build on guest) ===
Guest: DragonFly dfbsd 6.5-DEVELOPMENT v6.5.0.1712.g89e6a-DEVELOPMENT (build 2026-06-29) X86_64_GENERIC
Compiler: cc 8.3 [DragonFly] Release/2019-02-22
Command:
cd /tmp/df70 && (cc -o df0070 df0070.c && cc -o probe probe.c && ./probe) > build.log 2>&1
$ cc -o df0070 df0070.c
$ cc -o probe probe.c
$ ./probe
sizeof(int) = 4
sizeof(size_t) = 8
sizeof(pid_t) = 4
sizeof(gregset_t) = 200 (struct reg)
sizeof(fpregset_t) = 512 (struct fpreg)
sizeof(prstatus_t) = 248
sizeof(prfpregset_t) = 512
sizeof(prpsinfo_t) = 120
MAXCOMLEN = 16
PRARGSZ = 80
PRSTATUS_VERSION = 1
PRPSINFO_VERSION = 1
sizeof(Elf_Note) = 12
sizeof(Elf64_Ehdr) = 64
sizeof(Elf64_Phdr) = 56
BUILD_EXIT=0
Derived constants for the PoC:
notesz = sizeof(prpsinfo_t) + sizeof(prstatus_t) + sizeof(prfpregset_t)
= 120 + 248 + 512 = 880
nthreads = (notesz - 120) / (248 + 512) = 760/760 = 1 (in [1,256])
panic n_namesz= 0x10000000
leak n_namesz= notesz - sizeof(Elf_Note) - 8 = 860
n_descsz = 120 (= sizeof(prpsinfo_t), passes the :340 check)