develooper Front page | perl.perl5.porters | Postings from October 2018

[perl #133620] heap buffer overflow (READ of size 13)

From:
Karl Williamson via RT
Date:
October 31, 2018 17:00
Subject:
[perl #133620] heap buffer overflow (READ of size 13)
Message ID:
rt-4.0.24-16157-1541005240-1537.133620-15-0@perl.org
Thank you for finding and reporting this

I moved this ticket to the public queue as the bug is not in a stable release.

The problem occurs when a substitute parse string is constructed.  Any errors have to be translated back to the terms of the original string.   This wasn't happening properly when the error was at the right edge of the new parse string.  It has been fixed by commit 232b691f3c51aaff6228f1358b7c7dbc09b41b14

The test I added is slightly different than what the original does, which reduces to

./perl -Dr -e /[<DF>-/i

where <DF> is the literal \xDF.  It's a pain getting non-UTF-8 into our test files.  So the added test doesn't do that, but still generates valgrind errors before the patch is applied.

-- 
Karl Williamson

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=133620



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About