DF-4883 / verdict.json
{ "finding_id": "DF-4883", "status": "inconclusive", "reproduced": 0, "impact": "none", "confidence": "certain", "verdict": "Algorithm-level defect PROVEN on the guest with verbatim library code (fixpt_harness.c, run.log): dc_fixpt_log diverges for nonpositive arguments because its ASSERT(arg.value>0) is a no-op in production (os_types.h:76) and the Newton exit test compares raw units (100 raw = 2.3e-8) while arg==0 moves res by 2^32 raw per step - log(0) traps integer 0/0 (SIGFPE, kernel mirror = #DE via the DF-1949 sink) after ~21 iterations, log(-1) after ~2; log(2) converges in 9 (sanity). Kernel manifestation NOT demonstrated: no AMD DC hardware on the guest and the only in-tree consumers (modules/color/color_gamma.c) domain-guard or feed strictly positive bases (coordinates_x grid never contains 0). Same-root-cause family members documented: dc_fixpt_exp 1LL<<-m / shl(u8 m) UB shifts (:365-371), mul/sqr/from_fraction ASSERT-only overflow + signed <<32 UB (:141), LLONG_MIN negations (:35,:74,:126). Low severity latent defect.", "exploit_chain": "(latent) DRM color-pipeline caller passes arg<=0 to dc_fixpt_log (directly or via dc_fixpt_pow = exp(log(base)*exp)) -> unbounded Newton descent -> exp(res) underflows to 0 -> dc_fixpt_div(arg,0) -> complete_integer_division_u64 -> #DE kernel panic (or permanent loop where the divisor never hits exactly 0). No such caller exists in this vintage on audited paths.", "evidence": "fixpt_harness.c (verbatim functions, production ASSERT semantics, only changes: no-op ASSERT, plain / % for div64, iteration counter + SIGFPE reporting, all marked HARNESS-ONLY), build.log, run.log (decisive lines: sanity 0.693147180/9 iters; SIGFPE ~21 iters for log(0); SIGFPE ~2 iters for log(-1)), VERDICT.md (reachability analysis of color_gamma.c:159/184-187, coordinates_x positivity), env.txt (no AMD GPU).", "kernel_refs": [ "sys/dev/drm/amd/display/dc/basics/fixpt31_32.c:385", "sys/dev/drm/amd/display/dc/basics/fixpt31_32.c:389", "sys/dev/drm/amd/display/dc/basics/fixpt31_32.c:404", "sys/dev/drm/amd/display/dc/basics/fixpt31_32.c:365", "sys/dev/drm/amd/display/dc/basics/fixpt31_32.c:141", "sys/dev/drm/amd/display/dc/os_types.h:76", "sys/dev/drm/amd/display/include/fixed31_32.h:431", "sys/dev/drm/amd/display/modules/color/color_gamma.c:159" ], "poc_changes": "Harness copied library bodies verbatim; kernel-only constructs substituted and documented in-file: ASSERT -> no-op (production semantics), div64_u64_rem -> % and /, added iteration counter and SIGFPE handler (marked HARNESS-ONLY); scenarios run in forked children with 60s watchdog so a trap cannot kill the reporting parent.", "attempts": 3, "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", "runtime_sec": 45, "guest_dirty": 0, "fix_status": "not_applicable", "fix_baseline_reproduced": 0, "fix_patched_reproduced": 0, "fix_verdict": "fix.diff implements the files own TODO domain guard (arg<=0 -> saturated -INF return). Validated against the harness logic (guarded log returns immediately instead of trapping) but not boot-tested in a kernel: the kernel path requires AMD DC hardware absent on this guest.", "fix_evidence": "findings/poc/DF-4883/fix.diff", "notes": "DF-1949 (ASSERT-only div0, lines 43-67) is the known instance of this files ASSERT-as-validation pattern and is NOT re-reported; this finding covers the non-div0 remainder with log-divergence as the halt-class headline. Reachability is latent: color_gamma.c guards its direct log call and its x-grid excludes 0, so no in-vintage caller passes arg<=0 - severity Low for that reason.", "recommended_fix": "Implement the dc_fixpt_log TODO domain guard (return saturated -INF for arg<=0) and audit pow callers; optionally add range clamps in mul/sqr/from_fraction", "build_cmd": "cc -O2 -Wall -o fixpt_harness fixpt_harness.c", "run_cmd": "./fixpt_harness", "code_hash": "dd4a7c26729cec8fe4227f47b356fc8839ac33b367f4ff5a6f1bde52d4be38ba" } |