DragonFlyBSD Kernel Audit
← triage · dashboard
DF-2273

Unbounded strlen() on user-supplied cv_volid in chsetvoltag can read past the 33-byte field

Summary

chsetvoltag calls strlen(csvr->csvr_voltag.cv_volid) on user-supplied 33-byte cv_volid array without first guaranteeing NUL termination. If user fills all 33 bytes with non-NUL characters strlen walks into cv_serial and padding scanning until it finds a NUL byte. Result clamped by min(...sizeof(ssvtp.vitf)==32) so memcpy is bounded - only strlen scan over-reads and over-read bytes are not retained. Hardening item - strnlen is the right primitive.

Discussion (0)

No comments yet.