{
  "finding_id": "DF-4202",
  "status": "not_reproduced",
  "reproduced": 0,
  "impact": "none",
  "confidence": "certain",
  "verdict": "DF-4035 radeon twin in amdgpu: drm_cvt_mode() returns NULL on drm_mode_create() failure (kzalloc/IDR exhaustion — drm_modes.c:66-80,164-169) and both call sites dereference or list_add the result unconditionally: amdgpu_connector_lcd_native_mode:405-407 (mode->type write through NULL) and amdgpu_connector_add_common_modes:459-460 (drm_mode_probed_add(NULL) = list_add_tail on NULL+offset). Reached from the LVDS/eDP no-EDID-modes fallback on every connector probe (lvds_get_modes:668/676, dp_get_modes:1251/1259), 17+ allocations per probe — a real window under kernel memory exhaustion (upstream fixed the identical radeon pattern with if (mode) guards). Not reproduced at runtime: guest has no AMD GPU (env.txt) and the deterministic trigger additionally needs OOM; trigger (with optional memory-hog mode) built and ran on the guest.",
  "exploit_chain": "memory-exhausted amdgpu LVDS/eDP machine + connector probe without EDID modes -> drm_mode_create NULL -> NULL deref / list_add on NULL -> kernel panic",
  "evidence": "VERDICT.md (NULL-return proof chain in drm_modes.c); trigger_df4202.c + run.log (guest run, hardware-gated); fix.diff (if (mode) guards); env.txt",
  "kernel_refs": [
    "sys/dev/drm/amd/amdgpu/amdgpu_connectors.c:405-407",
    "sys/dev/drm/amd/amdgpu/amdgpu_connectors.c:459-460",
    "sys/dev/drm/amd/amdgpu/amdgpu_connectors.c:645-680",
    "sys/dev/drm/amd/amdgpu/amdgpu_connectors.c:1247-1260",
    "sys/dev/drm/drm_modes.c:66-80",
    "sys/dev/drm/drm_modes.c:143-169"
  ],
  "poc_changes": "trigger written from scratch (raw ioctls, probe hammer + optional forked memory hogs, self-contained struct defs); __u32/__u64 typedefs added after first guest compile",
  "attempts": 1,
  "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": 10,
  "guest_dirty": 0,
  "build_cmd": "./build.sh  (guest cc -O2 -Wall)",
  "run_cmd": "./run.sh   (optionally ./trigger_df4202 oom on real hardware)",
  "code_hash": "e60cb26b66a335e6b4e329c3fdb71eee65751e117a8b1ed24ec5ab9c3af74e34",
  "notes": "Hardware-gated (no amdgpu device — env.txt) and OOM-gated; the drm_mode_duplicate path at :391 is checked (mode->type only written after drm_mode_duplicate success at :391-393 has the same exposure but drm_mode_duplicate NULL also unchecked at :392 — same class, covered by the fix pattern; primary sites remain :405/:459).",
  "recommended_fix": "if (mode) guards at both sites (see fix.diff); also guard the drm_mode_duplicate result at :391 for completeness.",
  "fix_status": "not_testable",
  "fix_baseline_reproduced": 0,
  "fix_patched_reproduced": 0,
  "fix_verdict": "fix.diff applies cleanly to a pristine copy of the real amdgpu_connectors.c (verified, cumulative with DF-4200/4201 diffs); kernel-build validation not possible on this guest (no AMD GPU).",
  "fix_evidence": "fix.diff; local patch --dry-run + applied-copy verification noted in VERDICT.md"
}
