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
F152152550: D10377.id27390.diff
Mon, Apr 13, 2:29 AM
F152111660: D10377.id27390.diff
Sun, Apr 12, 7:32 PM
Unknown Object (File)
Sat, Apr 11, 11:39 PM
Unknown Object (File)
Sat, Apr 11, 5:58 AM
Unknown Object (File)
Fri, Apr 10, 11:41 AM
Unknown Object (File)
Tue, Apr 7, 7:37 AM
Unknown Object (File)
Tue, Mar 31, 9:52 PM
Unknown Object (File)
Wed, Mar 25, 10:42 AM
Subscribers
None

Details

Summary

Found with ttyname_test and CHERI bounds checking.

Sponsored by: DARPA, AFRL
Obtained from: CheriBSD

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.