Files
sed/testsuite
Assaf Gordon c52a676e5e sed: fix heap buffer overflow from invalid references
Under certain conditions sed would access invalid memory based on
the requested back-reference (e.g. "s//\9/" would access the 9th element
in the regex registers without checking it is at least 9 element in
size).

The following examples would trigger valgrind errors:
    seq 2 | valgrind sed         -e '/^/s///p ; 2s//\9/'
    seq 2 | valgrind sed --posix -e '/2/p ;     2s//\9/'

Reported by bugs@feusi.co in
https://lists.gnu.org/r/bug-sed/2018-07/msg00004.html .

* NEWS: Mention the bugfix.
* sed/execute.c (append_replacement): Check number of allocated regex
replacement registers before accessing the array.
* sed/testsuite/bug32082.sh: Test sed for this behaviour under valgrind.
* sed/testsuite/local.mk (T): Add new test.
2018-07-08 20:09:51 -06:00
..
2004-10-20 21:42:31 +00:00
2004-10-20 21:42:31 +00:00
2017-05-10 21:39:57 -04:00
2004-10-20 21:42:31 +00:00
2004-10-20 21:42:31 +00:00
2018-03-22 16:00:43 -07:00
2004-10-20 21:42:31 +00:00
2004-10-20 21:42:31 +00:00
2004-10-20 21:42:31 +00:00
2018-03-14 18:41:09 -04:00
2004-10-20 21:42:31 +00:00
2004-10-20 21:42:31 +00:00
2004-10-20 21:42:31 +00:00