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)
Sat, Apr 18, 9:45 PM
Unknown Object (File)
Sat, Apr 18, 4:21 PM
Unknown Object (File)
Sat, Apr 18, 3:41 AM
Unknown Object (File)
Mon, Apr 6, 6:15 PM
Unknown Object (File)
Sun, Apr 5, 3:58 PM
Unknown Object (File)
Sat, Apr 4, 3:03 PM
Unknown Object (File)
Mar 19 2026, 4:24 AM
Unknown Object (File)
Mar 11 2026, 10:28 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