]> sourceware.org Git - glibc.git/commit
regex: fix heap-use-after-free error
authorAssaf Gordon <assafgordon@gmail.com>
Thu, 6 Sep 2018 06:25:07 +0000 (23:25 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 16 Dec 2018 15:08:29 +0000 (07:08 -0800)
commit077caf61d867d4cab49b5aa42da1611868596fe7
tree870ea6314a4cb90d4db2b91eca8f100c6cf6b688
parent0c1719e65b2a5a80331d4f635612799f853b0479
regex: fix heap-use-after-free error

[BZ #18040]
Problem reported by Saito Takaaki <tails.saito@gmail.com> in
https://debbugs.gnu.org/32592
Call stack get_subexp->get_subexp_sub->clean_state_log_if_needed may
call extend_buffers which reallocates the re_string_t internal buffer.
Local variable 'buf' was not updated in such case, resulting in
use-after-free.
* posix/regexec.c (get_subexp): Update 'buf' after call to
get_subexp_sub.
ChangeLog
posix/regexec.c
This page took 0.035385 seconds and 5 git commands to generate.