DF-2454 / verdict.json
{ "status": "reproduced", "reproduced": 1, "impact": "none", "confidence": "certain", "verdict": "ksnprintf length-tracking overrun confirmed mechanically: production dm_target_stripe_table with 32 stripes, a 16-char pdev name and 20-digit offsets returned a params buffer whose bytes [1024..1104] contain dfhleakdisk00000001 -9223372036854775808 ... - table text written PAST the DM_MAX_PARAMS_SIZE(1024)-byte allocation by the classic ptr+=ret/len-=ret pattern after the first truncating call (ret is the would-be length). The adjacent chunks original content (/libexec...) is visible beside the corruption. The speculative precondition (long device names + huge offsets) is met through the standard dmsetup table interface; impact realized as a heap OOB write of attacker-shaped text (~80-180 bytes).", "exploit_chain": "root loads a 31+ stripe table with >=10-char device names and large offsets, then any table/status query (dmsetup table/status) overruns the params heap chunk with attacker-shaped text", "evidence": "run.log (bytes past the buffer dump)", "kernel_refs": [ "sys/dev/disk/dm/striped/dm_target_striped.c:170", "sys/dev/disk/dm/striped/dm_target_striped.c:223" ], "poc_changes": "verbatim dm_target_striped.c compiled into the rig; fabricated tsc with 32 stripe_devs on long-named pdevs; production table function called directly", "attempts": 2, "runtime_sec": 600, "guest_dirty": 0, "build_cmd": "see build.sh (dfmisc.ko verbatim striped target)", "run_cmd": "sysctl \"kern.dfmiscgo=stripe 32\"", "notes": "twin of DF-1933 (the info() variant shares the root cause)", "recommended_fix": "clamp: ret = ksnprintf(...); if (ret > (int)len) ret = len; before ptr+=ret/len-=ret (both table and info)", "finding_id": "DF-2454", "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul 2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64", "runner": "df-bsd-reviewer", "code_hash": "69dbf9bb5732f0ffe7e8a8490d8ed55c8857a4b293df8c6abf21c24ee3c297c5" } |