Page MenuHomeFreeBSD

awk: Fix subobject out-of-bounds access
ClosedPublic

Authored by arichardson on Sep 21 2020, 2:57 PM.
Tags
None
Referenced Files
F168855745: D26509.id.diff
Sun, Aug 30, 11:37 AM
F168842201: D26509.diff
Sun, Aug 30, 10:04 AM
F168830368: D26509.id77290.diff
Sun, Aug 30, 8:46 AM
Unknown Object (File)
Sat, Aug 29, 6:12 AM
Unknown Object (File)
Fri, Aug 28, 2:34 AM
Unknown Object (File)
Thu, Aug 27, 10:04 AM
Unknown Object (File)
Wed, Aug 26, 9:24 PM
Unknown Object (File)
Tue, Aug 25, 7:32 AM
Subscribers
None

Details

Summary

When matching a regex with ^, it would attempt to access
gototab[NSTATES][NCHARS+2], and therefore access the state for the \002
character instead. This change is required to run awk under CHERI (with
sub-object bounds) and when running with UBSAN instrumentation.

This was committed upstream as https://github.com/onetrueawk/awk/commit/cbf924342b63a095a4c6842280c3085b1b63ae45

Found by: CHERI (with subobject bounds enabled)
Obtained from: CheriBSD

Diff Detail

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