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

Missing bounds validation on drm_fbdev_overalloc enables u32 overflow in framebuffer height

Summary

drm_fb_helper_single_fb_probe at drm_fb_helper.c:2015: sizes.surface_height*=drm_fbdev_overalloc (int module param, no range check). Upstream Linux clamps [100,200] (commit 3a8c7880eff7), DFly omits. overalloc=994206 with height=4320 -> (4320*994206)mod 2^32=3624 -> /100=36px -> undersized fb allocation -> heap overflow on fbcon write. Requires kernel cmdline control (root/boot). Fix: clamp to [100,200].

Discussion (0)

No comments yet.

PoC verification

Evidence pack

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

DF-1266 - Verification Verdict

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

Finding

Missing bounds validation on drm_fbdev_overalloc enables u32 overflow in framebuffer height

Source Location

sys/dev/drm/drm_fb_helper.c:2014-2016

Verdict

Source-confirmed: Missing bounds validation on drm_fbdev_overalloc enables u32 overflow . 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

drm_fb_helper_single_fb_probe at drm_fb_helper.c:2015: sizes.surface_height=drm_fbdev_overalloc (int module param, no range check). Upstream Linux clamps [100,200] (commit 3a8c7880eff7), DFly omits. overalloc=994206 with height=4320 -> (4320994206)mod 2^32=3624 -> /100=36px -> undersized fb allocation -> heap overflow on fbcon write. Requires kernel cmdline control (root/boot). Fix: clamp to [100,200].

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: drm_fbdev_overalloc module param not bounded (0-100), u32 overflow in surface_height multiplication. Added range check.

Verified recommended fix

Source-confirmed: drm_fbdev_overalloc module param not bounded (0-100), u32 overflow in surface_height multiplication. Added range check.

Verdict

Source-confirmed: drm_fbdev_overalloc module param not bounded (0-100), u32 overflow in surface_height multiplication. Added range check.