[Bug 1997912] Re: /usr/share/apport/whoopsie-upload-all:binascii.Error:/usr/share/apport/whoopsie-upload-all at 249:main:collect_info:process_report:load:_decompress_line:b64decode

Launchpad Bug Tracker 1997912 at bugs.launchpad.net
Fri Jul 28 23:18:11 UTC 2023


This bug was fixed in the package apport - 2.27.0-0ubuntu2

---------------
apport (2.27.0-0ubuntu2) mantic; urgency=medium

  * Run only pylint --errors-only and mypy from tests/run-linters (LP: #2028881)
  * Depend on dictionaries-common for having a dpkg diversion test package
    (LP: #2028879)

 -- Benjamin Drung <bdrung at ubuntu.com>  Fri, 28 Jul 2023 18:59:34 +0200

** Changed in: apport (Ubuntu)
       Status: Triaged => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1997912

Title:
  /usr/share/apport/whoopsie-upload-
  all:binascii.Error:/usr/share/apport/whoopsie-upload-
  all at 249:main:collect_info:process_report:load:_decompress_line:b64decode

Status in Apport:
  Fix Released
Status in apport package in Ubuntu:
  Fix Released
Status in apport source package in Kinetic:
  Confirmed
Status in apport source package in Lunar:
  Triaged

Bug description:
  Impact
  ======

  apport-unpack and whoopsie-upload-all can crash when fed with a
  malformed problem report. They should print a proper error message
  instead of crashing.

  Test Plan
  =========

  1. Create malformed report:
  ```
  printf "CoreDump: base64\n H4sICAAAAAAC/0NvcmVEdW1wAA==\n 7Z0LYFPV/cdP0rQ\n" > malformed.crash
  ```
  2. Try to unpack it:
  ```
  apport-unpack malformed.crash unpack
  ```

  It should print an error message instead of a stack trace.

  Where problems could occur
  ==========================

  The patch touches the problem report handling and therefore can affect
  apport-unpack, apport-bug, whoopsie-upload-all. The change is covered
  with tests and apport has a test suite running during build and as
  autopkgtest.

  Original report
  ===============

  ```
  Traceback (most recent call last):
    File "/usr/share/apport/whoopsie-upload-all", line 249, in <module>
      main()
    File "/usr/share/apport/whoopsie-upload-all", line 231, in main
      stamps = collect_info()
    File "/usr/share/apport/whoopsie-upload-all", line 162, in collect_info
      res = process_report(r)
    File "/usr/share/apport/whoopsie-upload-all", line 76, in process_report
      r.load(f, binary="compressed")
    File "/usr/lib/python3/dist-packages/problem_report.py", line 139, in load
      bd, value = self._decompress_line(line, bd, value)
    File "/usr/lib/python3/dist-packages/problem_report.py", line 276, in _decompress_line
      block = base64.b64decode(line)
    File "/usr/lib/python3.10/base64.py", line 87, in b64decode
      return binascii.a2b_base64(s)
  binascii.Error: Incorrect padding
  ```

  The Ubuntu Error Tracker has been receiving reports about a problem regarding apport.  This problem was most recently seen with package version 2.23.1-0ubuntu3, the problem page at https://errors.ubuntu.com/problem/dd58c8169d2ec8468ccccb8b37471dfb701ac31c contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
  If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

To manage notifications about this bug go to:
https://bugs.launchpad.net/apport/+bug/1997912/+subscriptions




More information about the foundations-bugs mailing list