HomeFreeBSD

sh: Fix out of bounds read when there is no ] after a [:class:].

Description

sh: Fix out of bounds read when there is no ] after a [:class:].

The initial check for a matching ] was incorrect if a ] may be consumed by a
[:class:]. The subsequent loop assumed that there must be a ].

Remove the initial check and make the loop cope with a missing ].

Found with afl-fuzz.

MFC after: 1 week

Details

Provenance
jillesAuthored on
Parents
rS287147: Fix local privilege escalation in IRET handler. [SA-15:21]
Branches
Unknown
Tags
Unknown