Page MenuHomeFreeBSD

awk: Fix subobject out-of-bounds access
ClosedPublic

Authored by arichardson on Sep 21 2020, 2:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 7 2024, 2:21 PM
Unknown Object (File)
Oct 2 2024, 9:50 PM
Unknown Object (File)
Sep 24 2024, 9:02 PM
Unknown Object (File)
Sep 24 2024, 9:02 PM
Unknown Object (File)
Sep 24 2024, 9:02 PM
Unknown Object (File)
Sep 15 2024, 5:04 PM
Unknown Object (File)
Sep 12 2024, 7:46 AM
Unknown Object (File)
Sep 7 2024, 5:50 PM
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