DF-1319 / build.sh
#!/bin/sh # DF-1319 — no userspace PoC is runnable on the QEMU audit guest. # # The bug lives in amdgpu's DisplayPort link-training path, triggered by a # malicious DP sink (dongle / MST hub / monitor) reporting an out-of-range # lane_count in DPCD 0x220 on hotplug -> HPD IRQ -> handle_automated_test -> # dp_test_send_link_training. amdgpu is NOT compiled into X86_64_GENERIC, # is NOT a loadable module on this guest, and there is NO AMD GPU hardware # in QEMU. Reproduction requires: (a) a host with an AMD GPU running # amdgpu, and (b) a malicious DP peripheral (or a USB-C DP attacker # device) under attacker control. See VERDICT.md for the full line-by-line # trace. # # This script instead documents the SOURCE-LEVEL fix build check: # cd /usr/src && patch -p1 < fix.diff && make nativekernel ... # The fix.diff was validated to apply cleanly (git apply --check) against # sys/dev/drm/amd/display/dc/core/dc_link_dp.c. amdgpu is not in the # X86_64_GENERIC kernel, so a nativekernel build does NOT exercise this # translation unit; the diff is compile-validated only at the apply stage. echo "DF-1319: no runnable userspace PoC on this guest (no AMD GPU / amdgpu)." echo "See VERDICT.md for the source trace and fix.diff for the patch." echo "Validating fix.diff applies cleanly:" git apply --check -p1 fix.diff && echo "APPLIES_CLEAN" || echo "apply-check FAILED" |