DragonFlyBSD Kernel Audit
DF-0410 / harness_fixed.log
← back to finding ↓ download raw
=== FIXED build (-DAPPLY_FIX) ===
BUILD_RC=0

=== FIXED run ===
=== DF-0410 ng_encode_string OOB primitive (netgraph7) ===
sized-string payload: strlen(raw)=0, attacker slen=20
VULNERABLE alloc (strlen*4+3) = 3 bytes
FIXED      alloc (slen*4+3)   = 83 bytes
loop iterations (slen)        = 20
max bytes loop can write      = 83 (excl. NUL)

ng_encode_string returned 25 bytes of encoded output:
  "\x001234567890123456789"

OOB READ: 23 bytes were encoded from BEYOND raw's NUL terminator (strlen(raw)=0 but 23 data bytes appear in output).
OOB WRITE: loop wrote 26 bytes into a 3-byte allocation => 23-byte HEAP OVERFLOW.

[APPLY_FIX] allocation now slen*4+3=83 >= 26 written => overflow GONE.
RUN_RC=0