Page MenuHomeFreeBSD

Fix a buffer overrun.
ClosedPublic

Authored by jhb on Aug 26 2020, 4:40 PM.

Details

Summary

fgetln() returns 'len' valid characters. line[len] is out of bounds.

Reported by: CHERI
Obtained from: CheriBSD

Test Plan
  • tests failed when compiled under CHERI and pass afterwards

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jhb requested review of this revision.Aug 26 2020, 4:40 PM
jhb created this revision.
This revision is now accepted and ready to land.Aug 26 2020, 5:54 PM
This revision was automatically updated to reflect the committed changes.