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 24, 2:18 AM
Unknown Object (File)
Fri, May 22, 2:31 PM
Unknown Object (File)
Fri, May 22, 3:04 AM
Unknown Object (File)
Fri, May 22, 12:37 AM
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
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