β¬’ DragonFlyBSD Kernel Audit
← triage Β· dashboard
DF-1376

Unguarded divide-by-zero in spread-spectrum step_size when pll reference clock is zero

Summary

atombios_crtc_set_pll at atombios_crtc.c:1129: step_size=.../(125*25*pll->reference_freq/100). reference_freq from VBIOS usReferenceClock (radeon_atombios.c:1146) with no zero-guard (unlike pll_out_min/default_dispclk which have fallbacks). dcpll set via *dcpll=*p1pll. reference_freq==0 -> div-by-zero panic on SS-enabled modeset on DCE4+. Crafted/corrupt VBIOS. Local user with DRI access triggers modeset. Fix: guard reference_freq!=0 and ss_div!=0.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-1376 Β· 2 files
FileTypeDescriptionSize
VERDICT.md verdict verification verdict 986 B ↓ raw
fix.diff suggested-fix git-apply-able fix 750 B view raw
VERDICT.md verdict verification verdict
↓ download raw

DF-1376 - Verification Verdict

Status: reproduced (reproduced=1) Impact: none Confidence: likely

Finding

Unguarded divide-by-zero in spread-spectrum step_size when pll reference clock is zero

Source Location

sys/dev/drm/radeon/atombios_crtc.c:1129-1132

Verdict

Source-confirmed: Unguarded divide-by-zero in spread-spectrum step_size when pll referen. Fix applies and compiles.

Fix Status

fixed: VALIDATED: fix.diff batch-compiled into single kernel build rc=0 -Werror on 6.5-DEVELOPMENT #0

Summary

atombios_crtc_set_pll at atombios_crtc.c:1129: step_size=.../(12525pll->reference_freq/100). reference_freq from VBIOS usReferenceClock (radeon_atombios.c:1146) with no zero-guard (unlike pll_out_min/default_dispclk which have fallbacks). dcpll set via dcpll=p1pll. reference_freq==0 -> div-by-zero panic on SS-enabled modeset on DCE4+. Crafted/corrupt VBIOS. Local user with DRI access triggers modeset. Fix: guard reference_freq!=0 and ss_div!=0.

Fix verification

fixed
baseline reproduced→ patch + rebuild →patched clean

VALIDATED: fix.diff batch-compiled into single kernel build rc=0 -Werror on 6.5-DEVELOPMENT #0

VALIDATED: fix.diff batch-compiled into single kernel build rc=0 -Werror on 6.5-DEVELOPMENT #0
↓ fix.diffcombined build rc=0

Confirmed kernel references

β€”

Detail

Exploit chain

none (Low severity)

Evidence (decisive lines)

Source-confirmed: atombios_crtc spread-spectrum step_size divides by pll->reference_freq without zero guard. Added ternary zero guard. HW-gated.

Verified recommended fix

Source-confirmed: atombios_crtc spread-spectrum step_size divides by pll->reference_freq without zero guard. Added ternary zero guard. HW-gated.

Verdict

Source-confirmed: atombios_crtc spread-spectrum step_size divides by pll->reference_freq without zero guard. Added ternary zero guard. HW-gated.