Page MenuHomeFreeBSD

awk: Fix subobject out-of-bounds access
ClosedPublic

Authored by arichardson on Sep 21 2020, 2:57 PM.
Tags
None
Referenced Files
F175689195: D26509.id77315.diff
Mon, Oct 12, 1:28 PM
F175687603: D26509.diff
Mon, Oct 12, 1:14 PM
Unknown Object (File)
Sat, Oct 10, 12:56 AM
Unknown Object (File)
Fri, Oct 9, 9:19 AM
Unknown Object (File)
Fri, Oct 9, 9:16 AM
Unknown Object (File)
Wed, Oct 7, 9:22 AM
Unknown Object (File)
Wed, Sep 30, 11:21 AM
Unknown Object (File)
Sat, Sep 19, 9:46 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