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, Feb 28, 8:04 AM
Unknown Object (File)
Mon, Feb 23, 3:51 AM
Unknown Object (File)
Sun, Feb 22, 11:35 PM
Unknown Object (File)
Sat, Feb 21, 7:11 PM
Unknown Object (File)
Sat, Feb 21, 7:11 PM
Unknown Object (File)
Sat, Feb 21, 8:27 AM
Unknown Object (File)
Thu, Feb 19, 8:47 PM
Unknown Object (File)
Thu, Feb 19, 8:32 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