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
Unknown Object (File)
Thu, Mar 19, 4:24 AM
Unknown Object (File)
Wed, Mar 11, 10:28 AM
Unknown Object (File)
Wed, Mar 11, 10:07 AM
Unknown Object (File)
Wed, Mar 11, 9:40 AM
Unknown Object (File)
Mon, Mar 9, 11:17 AM
Unknown Object (File)
Feb 28 2026, 8:04 AM
Unknown Object (File)
Feb 23 2026, 3:51 AM
Unknown Object (File)
Feb 22 2026, 11:35 PM
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