DragonFlyBSD Kernel Audit
DF-0046 / fix_run.log
← back to finding ↓ download raw
=== PATCHED KERNEL: DragonFly 6.5-DEVELOPMENT #1: Sun Jul 12 23:47:04 UTC 2026 ===
=== sha256(/boot/kernel/kernel) = 425bca4973a730ceafb4cda4a71b64cd26e10c45d41e26eb55e26e171243619e ===

[run 1: sem_wrap.c -- the original PoC, expects wrap; on patched kernel should ERANGE at op2]
$ ./sem_wrap
sem_wrap: op2 (POSIX says ERANGE; DragonFly allows): Result too large
EXIT=1
  -> op2 (32767 -> 65534, > SEMVMX) now correctly returns ERANGE. Bug GONE.

[run 2: fix_test.c -- supplementary, tests positive-op + SETVAL + smoke]
$ ./fix_test
[pos-op] +SEMVMX rc=0; +1 rc=-1 errno=34 (Result too large)
    -> FIX OK: positive-op enforces SEMVMX (ERANGE)
[SETVAL] =SEMVMX rc=0; =SEMVMX+1 rc=-1 errno=34 (Result too large)
    -> FIX OK: SETVAL enforces SEMVMX (ERANGE)
[smoke] -1 rc=0 semval=32766 (should be SEMVMX-1=32766)
EXIT=0

[runs 3,4: fix_test.c -- determinism]
(both identical to run 2)