Page MenuHomeFreeBSD

Fix an out-of-bounds write when a zero-length buffer is passed.
ClosedPublic

Authored by brooks on Apr 12 2017, 10:57 PM.
Tags
None
Referenced Files
F148940619: D10377.id27413.diff
Sat, Mar 21, 4:39 AM
F148940599: D10377.id27413.diff
Sat, Mar 21, 4:39 AM
Unknown Object (File)
Thu, Mar 19, 12:44 AM
Unknown Object (File)
Tue, Mar 3, 9:17 PM
Unknown Object (File)
Feb 8 2026, 6:23 AM
Unknown Object (File)
Feb 7 2026, 4:04 PM
Unknown Object (File)
Jan 24 2026, 11:13 PM
Unknown Object (File)
Jan 24 2026, 8:35 PM
Subscribers
None

Details

Summary

Found with ttyname_test and CHERI bounds checking.

Sponsored by: DARPA, AFRL
Obtained from: CheriBSD

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8705
Build 9040: arc lint + arc unit

Event Timeline

I also wonder if we should perform a NULL pointer check, but POSIX doesn't explicitly allow EINVAL.

This revision is now accepted and ready to land.Apr 12 2017, 11:10 PM

I also wonder if we should perform a NULL pointer check, but POSIX doesn't explicitly allow EINVAL.

Bruce would argue that a SIGSEGV is a valid NULL pointer check. That is the failure case for many other APIs in userland (e.g. strlen() and strcpy()).

This revision was automatically updated to reflect the committed changes.