DF-2435 / fix_run_readback.log
[*] DF-2435 dm_target_crypt_init status_str heap overflow
[*] kmalloc(len) = 94 bytes (from input argv strlen+1)
[*] ksprintf("%ju", UQUAD_MAX) renders 20 chars per offset
[*] formatted output = 130 bytes (incl NUL)
[*] ===> HEAP OVERFLOW = 36 bytes past kmalloc boundary
[*] firing overflow reload...
[*] reload rv=0 (ok) -- dm_target_crypt_init completed (ksprintf ran)
[*] reading back status_str via command=table (INACTIVE)...
[*] kmalloc'd buffer size = 94 bytes
[*] status_str read back = 129 bytes:
"aes-xts-plain 0000000000000000000000000000000000000000000000000000000000000000 18446744073709551615 /dev/md0 18446744073709551615"
[!!!] OVERFLOW CONFIRMED: status_str is 129 bytes but buffer was
only kmalloc(94). ksprintf wrote 35 bytes past the end
into adjacent kernel heap (slab zone for size-96 objects).
[!!!] Contains UQUAD_MAX digits "18446744073709551615" -- the
%ju over-expansion of strtouq("-1") that the buffer was
NOT sized for.
[*] This is a confirmed heap overflow (CWE-787 OOB write) in
sys/dev/disk/dm/crypt/dm_target_crypt.c:573.
RUN_EXIT=0