[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#932491: python3-apt: segfault reading from lzma stream



Package: python3-apt
Version: 1.9.0
Severity: normal

The following script segfaults if python3-apt is installed, but
completes if not. Replacing lzma.open with open (and replacing
Sources.xz with Sources) also makes the segfault go away.  It seems to
be the same with python3-apt 1.8.4. I didn't check the python2 version
because lzma is (afaik) python3 only.

#!/usr/bin/python3
from debian.deb822 import Sources
import lzma

with lzma.open('Sources.xz', mode='rb') as f:
    for src in Sources.iter_paragraphs(f):
        package_name = src.get('Package')
        version = src.get('Version')


-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-apt depends on:
ii  libapt-pkg5.90     1.9.1
ii  libc6              2.28-10
ii  libgcc1            1:8.3.0-6
ii  libstdc++6         8.3.0-6
ii  python-apt-common  1.8.4
ii  python3            3.7.3-1

Versions of packages python3-apt recommends:
ii  iso-codes    4.3-1
ii  lsb-release  10.2019051400

Versions of packages python3-apt suggests:
ii  apt              1.9.1
pn  python-apt-doc   <none>
ii  python3-apt-dbg  1.9.0

-- no debconf information


Reply to: