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

scmmap under-bounds offset when framebuffer height*stride is 0 or overflows int

Summary

scmmap at syscons.c:4090-4097: sz=roundup(fbi->height*fbi->stride,PAGE_SIZE). height/stride uint16; product computed as int (overflows 65535*65535). If height or stride=0: sz=0, sz-PAGE_SIZE underflows to ~2^64-4096, any offset passes bound -> vtophys(vaddr+offset) maps unintended physical memory. Requires SYSCAP_RESTRICTEDROOT + buggy/malicious framebuffer driver. Fix: reject height==0||stride==0, compute in size_t, check sz>=PAGE_SIZE before subtraction.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-1202 Β· 1 files
FileTypeDescriptionSize
manifest.json file 397 B view raw

Fix verification

not_testable
baseline reproduced→ patch + rebuild →patched clean

recommended fix identified; fix.diff not authored/validated in this batch

recommended fix identified; fix.diff not authored/validated in this batch
combined build rc=0

Confirmed kernel references

β€”

Detail

Exploit chain

none (Info severity)

Evidence (decisive lines)

Source-confirmed at sys/dev/misc/syscons/syscons.c:4089: scmmap under-bounds offset when framebuffer height*stride is 0 or overflows int

Verified recommended fix

Source-confirmed at sys/dev/misc/syscons/syscons.c:4089: scmmap under-bounds offset when framebuffer height*stride is 0 or overflows int

Verdict

Source-confirmed at sys/dev/misc/syscons/syscons.c:4089: scmmap under-bounds offset when framebuffer height*stride is 0 or overflows int