[New-bugs-announce] [issue46339] PEG parser segfault from ast.literal_eval

Gregory P. Smith report at bugs.python.org
Mon Jan 10 21:56:11 EST 2022

New submission from Gregory P. Smith <greg at krypto.org>:

cpython/b$ ./python 
Python 3.11.0a3+ (heads/main-dirty:081a214008, Jan 11 2022, 02:48:22) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> ast.literal_eval('''F"""
... {6
... 0="""''')
Segmentation fault

this was discovered by oss-fuzz.

This may be a recent regression?  It didn't happen on my build from a few weeks ago.  worth testing on older versions.

assignee: pablogsal
components: Parser
messages: 410270
nosy: gregory.p.smith, lys.nikolaou, pablogsal
priority: normal
severity: normal
stage: needs patch
status: open
title: PEG parser segfault from ast.literal_eval
type: crash
versions: Python 3.11

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list