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)
Sun, May 17, 7:43 PM
Unknown Object (File)
Sun, May 17, 7:42 PM
Unknown Object (File)
Sat, May 16, 5:23 PM
Unknown Object (File)
Sat, May 16, 5:23 PM
Unknown Object (File)
Thu, Apr 30, 4:53 AM
Unknown Object (File)
Mon, Apr 27, 10:36 PM
Unknown Object (File)
Mon, Apr 27, 4:20 AM
Unknown Object (File)
Sun, Apr 26, 1:19 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