Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1597617 - crash in libarchive from python
Summary: crash in libarchive from python
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-libarchive
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dhiru Kholia
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-03 10:06 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2018-07-03 10:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)
crash reproducer (deleted)
2018-07-03 10:06 UTC, Zbigniew Jędrzejewski-Szmek
no flags Details

Description Zbigniew Jędrzejewski-Szmek 2018-07-03 10:06:53 UTC
Created attachment 1456164 [details]
crash reproducer

Description of problem:
Please see the attached reproducer. This crashes both in rawhide mock and in F28.

Version-Release number of selected component (if applicable):
libarchive-3.3.2-1.fc29.x86_64
python3-libarchive-c-2.8-1.fc29.noarch

How reproducible:
100%

Steps to Reproduce:
1. python3 test1.py

Comment 1 Zbigniew Jędrzejewski-Szmek 2018-07-03 10:11:40 UTC
$ gdb --args python3 test1.py
(gdb) r
Program received signal SIGSEGV, Segmentation fault.
0x00005555557f2080 in ?? ()
(gdb) bt
#0  0x00005555557f2080 in ?? ()
#1  0x00007fffef89ad1e in ffi_call_unix64 () at ../src/x86/unix64.S:76
#2  0x00007fffef89a68f in ffi_call (cif=<optimized out>, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>) at ../src/x86/ffi64.c:525
#3  0x00007fffefaae90b in _call_function_pointer (argcount=2, resmem=0x7fffffffd520, restype=<optimized out>, atypes=0x7fffffffd4e0, avalues=0x7fffffffd500, pProc=0x7fffecaf7a30 <archive_read_next_header2>, flags=4353) at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Modules/_ctypes/callproc.c:809
#4  _ctypes_callproc () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Modules/_ctypes/callproc.c:1166
#5  0x00007fffefaaf314 in PyCFuncPtr_call () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Modules/_ctypes/_ctypes.c:3962
#6  0x00007ffff79980f4 in _PyObject_FastCallDict () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Objects/abstract.c:2331
#7  0x00007ffff7a06d8d in call_function () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Python/ceval.c:4848
#8  0x00007ffff7a30e9a in _PyEval_EvalFrameDefault () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Python/ceval.c:3322
#9  0x00007ffff79f9872 in gen_send_ex () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Objects/genobject.c:189
#10 0x00007ffff79f9fb1 in gen_iternext (gen=<optimized out>) at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Objects/genobject.c:563
#11 builtin_next () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Python/bltinmodule.c:1330
#12 0x00007ffff79f918f in _PyCFunction_FastCallDict () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Objects/methodobject.c:234
#13 0x00007ffff7a06c5a in call_function () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Python/ceval.c:4824
#14 0x00007ffff7a30e9a in _PyEval_EvalFrameDefault () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Python/ceval.c:3322
#15 0x00007ffff7a0fb38 in _PyEval_EvalCodeWithName (qualname=0x0, name=<optimized out>, closure=<optimized out>, kwdefs=<optimized out>, defcount=0, defs=<optimized out>, kwstep=2, kwcount=<optimized out>, kwargs=0x0, kwnames=0x0, argcount=0, args=0x0, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='test1.py') at remote 0x7ffff7efeac8>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7ffff7fc5638>, '__file__': 'test1.py', '__cached__': None, 'libarchive': <module at remote 0x7fffefcd75e8>, 'os': <module at remote 0x7ffff7e8e138>, 'path': 'test1.tar', 'archive': <ArchiveRead(_pointer=93824995752368) at remote 0x7fffefcd05c0>}, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='test1.py') at remote 0x7ffff7efeac8>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7ffff7fc5638>, '__file__': 'test1.py', '__cached__': None, 'libarchive': <module at remote 0x7fffefcd75e8>, 'os': <module at remote 0x7ffff7e8e138>, 'path': 'test1.tar', 'archive': <ArchiveRead(_pointer=93824995752368) at remote 0x7fffefcd05c0>}, _co=<code at remote 0x7ffff7f018a0>) at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Python/ceval.c:4153
#16 PyEval_EvalCodeEx () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Python/ceval.c:4174
#17 0x00007ffff7a108bb in PyEval_EvalCode (co=co@entry=<code at remote 0x7ffff7f018a0>, globals=globals@entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='test1.py') at remote 0x7ffff7efeac8>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7ffff7fc5638>, '__file__': 'test1.py', '__cached__': None, 'libarchive': <module at remote 0x7fffefcd75e8>, 'os': <module at remote 0x7ffff7e8e138>, 'path': 'test1.tar', 'archive': <ArchiveRead(_pointer=93824995752368) at remote 0x7fffefcd05c0>}, locals=locals@entry={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='test1.py') at remote 0x7ffff7efeac8>, '__spec__': None, '__annotations__': {}, '__builtins__': <module at remote 0x7ffff7fc5638>, '__file__': 'test1.py', '__cached__': None, 'libarchive': <module at remote 0x7fffefcd75e8>, 'os': <module at remote 0x7ffff7e8e138>, 'path': 'test1.tar', 'archive': <ArchiveRead(_pointer=93824995752368) at remote 0x7fffefcd05c0>}) at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Python/ceval.c:730
#18 0x00007ffff7a9c692 in run_mod () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Python/pythonrun.c:1025
#19 0x00007ffff7a9d35d in PyRun_FileExFlags () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Python/pythonrun.c:978
#20 0x00007ffff7a9eee7 in PyRun_SimpleFileExFlags () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Python/pythonrun.c:420
#21 0x00007ffff7a9efb7 in PyRun_AnyFileExFlags () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Python/pythonrun.c:81
#22 0x00007ffff7a9fe7c in run_file (p_cf=0x7fffffffdd5c, filename=0x5555557584d0 L"test1.py", fp=0x55555580a220) at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Modules/main.c:344
#23 Py_Main () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Modules/main.c:814
#24 0x0000555555554d45 in main () at /usr/src/debug/python3-3.6.5-1.fc27.x86_64/Programs/python.c:102
#25 0x00007ffff6b73f2a in __libc_start_main () from /lib64/libc.so.6
#26 0x0000555555554eba in _start ()


Reproducer works in F27 too ;)


Note You need to log in before you can comment on or make changes to this bug.