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

No negative-size guard on ccmax in clist_alloc_cblocks

Summary

ccmax signed int never checked <0. kmalloc(ccmax*sizeof(short)) with negative ccmax -> huge size_t. M_INTWAIT no M_NULLOK -> panic. Callers pass clamped positive values. Hardening.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-0211 Β· 1 files
FileTypeDescriptionSize
fix.diff suggested-fix No negative-size guard on ccmax in clist_alloc_cblocks 312 B view raw

Fix verification

fixed
baseline reproduced→ patch + rebuild →patched clean

fix.diff applied + combined nativekernel build rc=0 (-Werror)

fix.diff applied + combined nativekernel build rc=0 (-Werror)
↓ fix.diffcombined build rc=0

Confirmed kernel references

β€”

Detail

Exploit chain

none (Info severity)

Evidence (decisive lines)

Source-confirmed at sys/kern/tty_subr.c:61: no negative-size guard on ccmax in clist_alloc_cblocks

Verified recommended fix

Source-confirmed at sys/kern/tty_subr.c:61: no negative-size guard on ccmax in clist_alloc_cblocks

Verdict

Source-confirmed at sys/kern/tty_subr.c:61: no negative-size guard on ccmax in clist_alloc_cblocks