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)
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)
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)
Mar 9 2026, 11:17 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 69766
Build 66649: arc lint + arc unit