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, Sep 12, 3:48 AM
Unknown Object (File)
Sun, Sep 6, 1:41 AM
Unknown Object (File)
Sat, Sep 5, 9:13 PM
Unknown Object (File)
Wed, Sep 2, 7:04 AM
Unknown Object (File)
Wed, Sep 2, 1:50 AM
Unknown Object (File)
Tue, Sep 1, 11:22 PM
Unknown Object (File)
Aug 18 2026, 5:06 PM
Unknown Object (File)
Aug 14 2026, 11:41 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