Page MenuHomeFreeBSD

awk: Fix subobject out-of-bounds access
ClosedPublic

Authored by arichardson on Sep 21 2020, 2:57 PM.
Tags
None
Referenced Files
F170573167: D26509.id.diff
Sat, Sep 5, 11:30 AM
F170553262: D26509.diff
Sat, Sep 5, 9:23 AM
F170432088: D26509.id77290.diff
Fri, Sep 4, 7:31 PM
Unknown Object (File)
Fri, Sep 4, 1:58 AM
Unknown Object (File)
Thu, Sep 3, 4:51 PM
Unknown Object (File)
Thu, Sep 3, 3:01 PM
Unknown Object (File)
Thu, Sep 3, 1:10 PM
Unknown Object (File)
Thu, Sep 3, 3:01 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