Page MenuHomeFreeBSD

awk: Fix subobject out-of-bounds access
ClosedPublic

Authored by arichardson on Sep 21 2020, 2:57 PM.
Tags
None
Referenced Files
F169535555: D26509.id.diff
Tue, Sep 1, 8:40 PM
F169421102: D26509.diff
Tue, Sep 1, 12:17 PM
Unknown Object (File)
Tue, Sep 1, 3:51 AM
Unknown Object (File)
Tue, Sep 1, 3:45 AM
Unknown Object (File)
Sun, Aug 30, 11:37 AM
Unknown Object (File)
Sun, Aug 30, 10:04 AM
Unknown Object (File)
Sun, Aug 30, 8:46 AM
Unknown Object (File)
Sat, Aug 29, 6:12 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

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 33690
Build 30928: arc lint + arc unit