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)
Wed, Jul 22, 1:29 PM
Unknown Object (File)
Sun, Jul 19, 6:36 PM
Unknown Object (File)
Tue, Jun 30, 4:05 AM
Unknown Object (File)
Jun 8 2026, 7:55 AM
Unknown Object (File)
May 16 2026, 1:16 AM
Unknown Object (File)
May 16 2026, 1:16 AM
Unknown Object (File)
May 16 2026, 1:15 AM
Unknown Object (File)
May 10 2026, 4:59 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