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
F176064135: D54623.id173088.diff
Thu, Oct 15, 6:52 PM
F176043029: D54623.id169405.diff
Thu, Oct 15, 2:18 PM
Unknown Object (File)
Tue, Oct 13, 6:30 AM
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
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