Lucene search

K
archlinuxArch LinuxASA-201503-4
HistoryMar 05, 2015 - 12:00 a.m.

grep: denial of service

2015-03-0500:00:00
Arch Linux
lists.archlinux.org
11

0.0004 Low

EPSS

Percentile

5.1%

The bmexec_trans function in kwset.c allows local users to cause a
denial of service (out-of-bounds heap read and crash) via crafted input
when using the -F option.

grep’s read buffer is often filled to its full size, except when reading
the final buffer of a file. In that case, the number of bytes read may
be far less than the size of the buffer. However, for certain unusual
pattern/text combinations, grep -F would mistakenly examine bytes in
that uninitialized region of memory when searching for a match. With
carefully chosen inputs, one can cause grep -F to read beyond the end of
that buffer altogether. This problem arose via commit v2.18-90-g73893ff
with the introduction of a more efficient heuristic using what is now
the memchr_kwset function. The use of that function in bmexec_trans
could leave TP much larger than EP, and the subsequent call to
bm_delta2_search would mistakenly access beyond end of the main input
read buffer.

OSVersionArchitecturePackageVersionFilename
anyanyanygrep< 2.21-2UNKNOWN