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)
Thu, Oct 1, 2:56 AM
Unknown Object (File)
Tue, Sep 29, 5:47 PM
Unknown Object (File)
Tue, Sep 29, 5:17 PM
Unknown Object (File)
Tue, Sep 29, 3:37 PM
Unknown Object (File)
Sun, Sep 27, 4:04 PM
Unknown Object (File)
Sun, Sep 27, 4:16 AM
Unknown Object (File)
Sat, Sep 26, 3:46 PM
Unknown Object (File)
Sat, Sep 26, 3:45 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