libpodofo: CVE-2018-5295

Related Vulnerabilities: CVE-2018-5295   CVE-2018-5309   CVE-2017-6845   CVE-2017-8054   CVE-2017-8378   CVE-2018-5308  

Debian Bug report logs - #889511
libpodofo: CVE-2018-5295

version graph

Reported by: Matthias Brinke <podofo-sec-contrib@mailbox.org>

Date: Sun, 4 Feb 2018 00:27:07 UTC

Severity: important

Tags: fixed-upstream, patch, security, upstream

Found in version libpodofo/0.9.5-8

Fixed in version libpodofo/0.9.5-9

Done: Mattia Rizzolo <mattia@debian.org>

Bug is archived. No further changes may be made.

Forwarded to https://sourceforge.net/p/podofo/mailman/message/36215539/

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Mattia Rizzolo <mattia@debian.org>:
Bug#889511; Package src:libpodofo. (Sun, 04 Feb 2018 00:27:09 GMT) (full text, mbox, link).


Acknowledgement sent to Matthias Brinke <podofo-sec-contrib@mailbox.org>:
New Bug report received and forwarded. Copy sent to Mattia Rizzolo <mattia@debian.org>. (Sun, 04 Feb 2018 00:27:09 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Matthias Brinke <podofo-sec-contrib@mailbox.org>
To: submit@bugs.debian.org
Subject: libpodofo: CVE-2018-5295
Date: Sun, 4 Feb 2018 01:24:53 +0100 (CET)
[Message part 1 (text/plain, inline)]
Source: libpodofo
Version: 0.9.5-8
Tags: upstream security patch
Severity: important

CVE-2018-5295 from the security-tracker.debian.org:
In PoDoFo 0.9.5, there is an integer overflow in
the PdfXRefStreamParserObject::ParseStream function
(base/PdfXRefStreamParserObject.cpp). Remote attackers
could leverage this vulnerability to cause a denial-of-service
via a crafted pdf file.

I've implemented a patch to fix this vulnerability, it is attached
and tested with the PoC from the report (RedHat Bugzilla #1531897)
and GCC 7 UBSan (-fsanitize=undefined in CXXFLAGS set via .sbuildrc).
The builds were done with sbuild in an up-to-date Debian sid chroot.
I've done the tests in a sandbox, where without the patch,
signed integer overflow was detected, with it, nothing from UBSan.
Otherwise, the same (expected, correct for the PoC) exception message
with detailed info and "call stack" (via PdfError method) was output
by podofoimgextract.
This bug is probably also present in version 0.9.4-6 in stretch, but I
haven't tested that, I don't use stretch (yet).

If you fix the vulnerability please also make sure to include the
CVE (Common Vulnerabilities & Exposures) id in your changelog entry.

Best regards, Matthias Brinke
[CVE-2018-5295.patch (text/x-patch, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#889511; Package src:libpodofo. (Sun, 04 Feb 2018 20:00:04 GMT) (full text, mbox, link).


Message #8 received at 889511@bugs.debian.org (full text, mbox, reply):

From: Mattia Rizzolo <mattia@debian.org>
To: Matthias Brinke <podofo-sec-contrib@mailbox.org>, 889511@bugs.debian.org
Subject: Re: Bug#889511: libpodofo: CVE-2018-5295
Date: Sun, 4 Feb 2018 20:57:27 +0100
[Message part 1 (text/plain, inline)]
Control: forwarded -1 https://sourceforge.net/p/podofo/mailman/message/36215539/

On Sun, Feb 04, 2018 at 01:24:53AM +0100, Matthias Brinke wrote:
> CVE-2018-5295 from the security-tracker.debian.org:
> In PoDoFo 0.9.5, there is an integer overflow in
> the PdfXRefStreamParserObject::ParseStream function
> (base/PdfXRefStreamParserObject.cpp). Remote attackers
> could leverage this vulnerability to cause a denial-of-service
> via a crafted pdf file.

Right.
For cross-reference, this is being dealt upstream by this thread that
started the 6th of Jan:
https://sourceforge.net/p/podofo/mailman/message/36180168/

> I've implemented a patch to fix this vulnerability, it is attached
> and tested

Thank you!
I've forwarded it upstream, see the first url above.

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
[signature.asc (application/pgp-signature, inline)]

Set Bug forwarded-to-address to 'https://sourceforge.net/p/podofo/mailman/message/36215539/'. Request was from Mattia Rizzolo <mattia@debian.org> to 889511-submit@bugs.debian.org. (Sun, 04 Feb 2018 20:00:05 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Mattia Rizzolo <mattia@debian.org>:
Bug#889511; Package src:libpodofo. (Tue, 20 Feb 2018 12:57:07 GMT) (full text, mbox, link).


Acknowledgement sent to Matthias Brinke <podofo-sec-contrib@mailbox.org>:
Extra info received and forwarded to list. Copy sent to Mattia Rizzolo <mattia@debian.org>. (Tue, 20 Feb 2018 12:57:07 GMT) (full text, mbox, link).


Message #15 received at 889511@bugs.debian.org (full text, mbox, reply):

From: Matthias Brinke <podofo-sec-contrib@mailbox.org>
To: 889511@bugs.debian.org, Mattia Rizzolo <mattia@debian.org>
Subject: Re: Bug#889511: libpodofo: CVE-2018-5295
Date: Tue, 20 Feb 2018 13:54:32 +0100 (CET)
Control: tags -1 fixed-upstream

Hello Mattia, hello all,

> On 04 February 2018 at 20:57 Mattia Rizzolo wrote:
> 
> 
> Control: forwarded -1 https://sourceforge.net/p/podofo/mailman/message/36215539/
> 
> On Sun, Feb 04, 2018 at 01:24:53AM +0100, Matthias Brinke wrote:
>> CVE-2018-5295 from the security-tracker.debian.org:
>> In PoDoFo 0.9.5, there is an integer overflow in
>> the PdfXRefStreamParserObject::ParseStream function
>> (base/PdfXRefStreamParserObject.cpp). Remote attackers
>> could leverage this vulnerability to cause a denial-of-service
>> via a crafted pdf file.
> 
> Right.
> For cross-reference, this is being dealt upstream by this thread that
> started the 6th of Jan:
> https://sourceforge.net/p/podofo/mailman/message/36180168/
>> I've implemented a patch to fix this vulnerability, it is attached
>> and tested
> 
> Thank you!
you're welcome,

> I've forwarded it upstream, see the first url above.

the patch has been accepted (committed in svn r1889 [1]), based on that
I've set this bug to "fixed-upstream" (above). I plan to fix CVE-2018-5309
next, even though there was a bit of disagreement about that upstream [2].

> 
> -- 
> regards,
>  Mattia Rizzolo
> 

Best regards, Matthias Brinke

[1] https://sourceforge.net/p/podofo/code/1889/
[2] https://sourceforge.net/p/podofo/mailman/message/36189599/



Added tag(s) fixed-upstream. Request was from Matthias Brinke <podofo-sec-contrib@mailbox.org> to 889511-submit@bugs.debian.org. (Tue, 20 Feb 2018 12:57:07 GMT) (full text, mbox, link).


Message sent on to Matthias Brinke <podofo-sec-contrib@mailbox.org>:
Bug#889511. (Sat, 24 Feb 2018 10:45:14 GMT) (full text, mbox, link).


Message #20 received at 889511-submitter@bugs.debian.org (full text, mbox, reply):

From: mattia@debian.org
To: 889511-submitter@bugs.debian.org
Subject: Bug #889511 in libpodofo marked as pending
Date: Sat, 24 Feb 2018 10:41:20 +0000
Control: tag -1 pending

Hello,

Bug #889511 in libpodofo reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below, and you can check the diff of the fix at:

https://salsa.debian.org/debian/libpodofo/commit/75bb96689ab3fe2ea8c2130027612ff0c43e17a3

------------------------------------------------------------------------
Add upstream patch for CVE-2018-5295

Closes: #889511
Signed-off-by: Mattia Rizzolo <mattia@debian.org>

------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings



Added tag(s) pending. Request was from mattia@debian.org to 889511-submitter@bugs.debian.org. (Sat, 24 Feb 2018 10:45:14 GMT) (full text, mbox, link).


Reply sent to Mattia Rizzolo <mattia@debian.org>:
You have taken responsibility. (Sat, 24 Feb 2018 11:27:22 GMT) (full text, mbox, link).


Notification sent to Matthias Brinke <podofo-sec-contrib@mailbox.org>:
Bug acknowledged by developer. (Sat, 24 Feb 2018 11:27:22 GMT) (full text, mbox, link).


Message #27 received at 889511-close@bugs.debian.org (full text, mbox, reply):

From: Mattia Rizzolo <mattia@debian.org>
To: 889511-close@bugs.debian.org
Subject: Bug#889511: fixed in libpodofo 0.9.5-9
Date: Sat, 24 Feb 2018 11:22:46 +0000
Source: libpodofo
Source-Version: 0.9.5-9

We believe that the bug you reported is fixed in the latest version of
libpodofo, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 889511@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mattia Rizzolo <mattia@debian.org> (supplier of updated libpodofo package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 24 Feb 2018 11:38:43 +0100
Source: libpodofo
Binary: libpodofo-dev libpodofo-utils libpodofo0.9.5
Architecture: source
Version: 0.9.5-9
Distribution: unstable
Urgency: medium
Maintainer: Mattia Rizzolo <mattia@debian.org>
Changed-By: Mattia Rizzolo <mattia@debian.org>
Description:
 libpodofo-dev - PoDoFo development files
 libpodofo-utils - PoDoFo utilities
 libpodofo0.9.5 - PoDoFo - library to work with the PDF file format
Closes: 860995 861562 861597 889511
Changes:
 libpodofo (0.9.5-9) unstable; urgency=medium
 .
   * Add upstream patches for security issues:
     + CVE-2017-6845 Closes: #861562
     + CVE-2017-8054 Closes: #860995
     + CVE-2017-8378 Closes: #861597
     + CVE-2018-5295 Closes: #889511
     + CVE-2018-5308
   * d/control:
     + Move the packaging to salsa.debian.org.
     + Bump Standards-Version to 4.1.3, no changes needed.
     + Move libpodofo-utils to section utils.
   * d/rules: Move from the deprecated dh_install --fail-missing to dh_missing.
   * d/copyright: Bump copyright year for debian/*.
   * Bump debhelper compat level to 11.
Checksums-Sha1:
 22265a95e4d0632000785feba79a12ba39026a91 2126 libpodofo_0.9.5-9.dsc
 f56846ede8d87fceb1d0384fcb2a98b0b9f54057 19888 libpodofo_0.9.5-9.debian.tar.xz
 bb9b6965c6a64da60a9fef215b7adde0c551adea 8544 libpodofo_0.9.5-9_amd64.buildinfo
Checksums-Sha256:
 09f495d02231c98b2d95dcd6fe0f4d3aadc280fde10cb97e75efc8ca75fb6012 2126 libpodofo_0.9.5-9.dsc
 31536fd0e81bc910ce3378840646f54c69463e230161c575bb1eeb38175fafd6 19888 libpodofo_0.9.5-9.debian.tar.xz
 84be9aa7806fe40e11b5fa7457300ced1421eea668f227d2c22bab4c5ab184ce 8544 libpodofo_0.9.5-9_amd64.buildinfo
Files:
 eb706e4b75cf4c71e9164347ceab5329 2126 libdevel optional libpodofo_0.9.5-9.dsc
 1acf189b272bde337c5e53a8a1f098b6 19888 libdevel optional libpodofo_0.9.5-9.debian.tar.xz
 746639378cf7664488a6d1fad869a854 8544 libdevel optional libpodofo_0.9.5-9_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEi3hoeGwz5cZMTQpICBa54Yx2K60FAlqRRZkACgkQCBa54Yx2
K60Djw/7B6Z8jdudjAFNY5yxQhm2urku6Lwbl1he1weOPLgdjbvnTMZhSociIhgV
GM4jGxqSacyA7v27p+jTl9UAXRU7uNamcq8QpKo15QB0zBu+HGVO+oyeZGREJHCM
Ph6PVpmFXrRyzhf5NKftzsi4abft0F9rUDtTaj4VJAJSBVuqyWjM6GLhcDsYCm3u
wUVsrqnP283+J44OfZbqWtVcSQimPwVN6DQ+5oxIRRyFiEFBkpjm+m0LpDFFhWP/
raqo+uBprDZd5X/9NQ4ZdNlyuKwSLC0gOhZtAlBUFgFE+MjZaYk1HQxRFvEKoS+P
ExV/vgBl/I0Au5XKixjM/YyzkXiPNAbPSio9hUXDEPmGJXI9qlBnv005VxtYFj4g
jzzudnNpuVNmsjFmPsjM3R4493k5JDKf7N8mqqpUBMWV4/9C8AbW5WGmTGLVBhdA
ONeP5kcjmetI5CqNNVDJKdpR60n0XhAjr8FxQW/UlXAq9XXcSkGIbM+4dmxiQPq/
ojLe7bCYGgPH0AgNZPVLA0NzBn7+fUh8vWVYUVUF2a+wQY8lyPSOPkmVULV4g+gu
H/4Eb3O39UxGTwzHq9V9KjRtXJVPfp+k9jAL5aLFmVwSghCgq2H+7su/8jT9uU/o
5xyRg+GBTgju/CID/MFYfXYjWb5m5XYtN5RhptXOXMB0+oEUd/8=
=ZRNu
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 25 Mar 2018 07:26:54 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Jun 19 19:05:57 2019; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.