[New-bugs-announce] [issue39038] OverflowError in tarfile.open

jvoisin report at bugs.python.org
Fri Dec 13 10:57:25 EST 2019

New submission from jvoisin <jvoisin at google.com>:

The attached file produces the following stacktrace when opened via `tarfile.open`, on Python 3.7.5rc1:

$ cat test.py 
import sys
import tarfile

$ python3 test.py ./crash-83a6e7d4b810c6a0bd4fd9dfd6a0b36550034ccf
Traceback (most recent call last):
  File "test.py", line 4, in <module>
  File "/usr/lib/python3.7/tarfile.py", line 1573, in open
    return func(name, "r", fileobj, **kwargs)
  File "/usr/lib/python3.7/tarfile.py", line 1645, in gzopen
    t = cls.taropen(name, mode, fileobj, **kwargs)
  File "/usr/lib/python3.7/tarfile.py", line 1621, in taropen
    return cls(name, mode, fileobj, **kwargs)
  File "/usr/lib/python3.7/tarfile.py", line 1484, in __init__
    self.firstmember = self.next()
  File "/usr/lib/python3.7/tarfile.py", line 2289, in next
    tarinfo = self.tarinfo.fromtarfile(self)
  File "/usr/lib/python3.7/tarfile.py", line 1097, in fromtarfile
    return obj._proc_member(tarfile)
  File "/usr/lib/python3.7/tarfile.py", line 1119, in _proc_member
    return self._proc_pax(tarfile)
  File "/usr/lib/python3.7/tarfile.py", line 1230, in _proc_pax
    match = regex.match(buf, pos)
OverflowError: Python int too large to convert to C ssize

components: Library (Lib)
files: crash-83a6e7d4b810c6a0bd4fd9dfd6a0b36550034ccf
messages: 358336
nosy: jvoisin
priority: normal
severity: normal
status: open
title: OverflowError in tarfile.open
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48773/crash-83a6e7d4b810c6a0bd4fd9dfd6a0b36550034ccf

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list