Page MenuHomeFreeBSD

libutil: avoid an out-of-bounds read in trimdomain(3)
ClosedPublic

Authored by kevans on Jan 9 2026, 5:00 PM.
Tags
None
Referenced Files
F165080901: D54623.id.diff
Wed, Aug 5, 8:54 PM
Unknown Object (File)
Wed, Aug 5, 7:10 AM
Unknown Object (File)
Tue, Aug 4, 8:13 AM
Unknown Object (File)
Mon, Aug 3, 2:42 AM
Unknown Object (File)
Thu, Jul 30, 1:39 PM
Unknown Object (File)
Thu, Jul 30, 1:39 PM
Unknown Object (File)
Thu, Jul 30, 10:18 AM
Unknown Object (File)
Thu, Jul 30, 10:18 AM
Subscribers

Details

Summary

memchr(3) will happily believe we've passed in a valid object, but
hostsize could easily exceed the bounds of fullhost. Clamp it down to
the string size to be safe and avoid UB.

Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable