Your message dated Wed, 09 Jul 2025 13:05:31 +0000
with message-id <e1uzuun-00ce6m...@fasolo.debian.org>
and subject line Bug#1109001: fixed in rust-sequoia-octopus-librnp 1.11.1-1
has caused the Debian Bug report #1109001,
regarding rust-sequoia-octopus-librnp: denial of service via specially crafted 
compressed message
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1109001: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1109001
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: rust-sequoia-octopus-librnp
Version: 1.11.0-1
Severity: important

Dear Maintainer,

reported by codean via the YesWeHack bug bounty program:


DoS via bzip2 decompression bomb

Bug type: Denial of Service (CWE-400)
Scope: octopus
Endpoint: decompression mechanism
Vulnerable part: Others
Part name: BZip
Payload: An openpgp message containing a specially crafted compressed message
Technical env.: OS
App. fingerprint:
CVE:
Impact:
IP used: 0.0.0.0

Description

The OpenPGP standard supports the use of a Compressed Data packet to include 
compressed content in OpenPGP messages. The sequoia-pgp implementation supports 
the zip, zlib, and bzip2 compression algorithms. Decompression for bzip2 is 
handled using the bzip2 library.

This decompression function is applied directly to the compressed content 
without checking the size of the resulting decompressed payload.

As a result, the library decompresses the entire content, regardless of size. 
This behavior is also present in octopus, the drop-in replacement for the RNP 
library used by Thunderbird.

Because sequoia-pgp does not enforce size limits on OpenPGP messages and due to 
the very high compression ratio achievable with bzip2 (greater than 5,000,000), 
an attacker can craft a small message that, when processed by sequoia-pgp in 
octopus, causes CPU usage to spike to 100% for a significant amount of time. 
This leads to resource exhaustion and renders Thunderbird unresponsive. Similar 
behavior will occur in any application or library that makes use of sequoia-pgp 
in a single-threaded manner.

The decompression factor could potentially be increased even further by using 
nested Compressed Data packets, but this was not tested.
Impact

An attacker is able to craft a PGP message that will force sequoia-pgp to 
drammatically increase the CPU usage, freezing the Thunderbird application when 
sequoia-octopus-librnp is used.
Decompressing a 98KB message, which inflates to 20GB of uncompressed content, 
takes up to 3 minutes on an AMD Ryzen 7 PRO 7840U machine.
While this applies to all supported compression algorithms, it has a 
significantly higher impact with bzip2, due to the much larger achievable 
compression ratio.
Solution

A suitable mitigation for libraries like sequoia-pgp is to implement a 
configurable size limit on the decompressed payload. This would help prevent 
Denial-of-Service attacks that exploit this behavior.
Attachment: Proof of Concept

In order to generate a small compressed PGP message we can use the following 
command, which will generate a 50KB ASCII-armored message with a 10GB 
decompressed payload:

dd if=/dev/zero bs=1M status=none count=10240 | gpg --compress-algo BZIP2 
--sign --armor --output dos_message.pgp.asc

Once generated, send the content as the body of an email and open it using 
Thunderbird with sequoia-octopus-librnp installed. You will notice that the 
application freezes and CPU usage spikes.


Triager

Hello,

We were able to reproduce the described behavior.

A Decompression Bomb (or Zip Bomb) is a maliciously crafted compressed file 
designed to consume excessive system resources when decompressed, potentially 
leading to denial of service or application crashes.

Because sequoia-pgp does not enforce size limits on OpenPGP messages and due to 
the very high compression ratio achievable with bzip2 (greater than 5,000,000), 
an attacker can craft a small message that, when processed by sequoia-pgp in 
octopus, causes CPU usage to spike to 100% for a significant amount of time. 
This leads to resource exhaustion and renders Thunderbird unresponsive. Similar 
behavior will occur in any application or library that makes use of sequoia-pgp 
in a single-threaded manner.
Proof of Concept

    The attacker crafts a small compressed PGP message :

    dd if=/dev/zero bs=1M status=none count=10240 | gpg --compress-algo BZIP2 
--sign --armor --output dos_message.pgp.asc

    This create a 50KB with a 10GB decompressed payload
    The attacker send this message as a body of an email

The victims open the email using Thunderbird with sequoia-octopus-librnp 
https://crates.io/crates/sequoia-octopus-librnp#building-on-linux

Then, attempt to decrypt the message and observe it dramatically increase the 
CPU usage, freezing the Thunderbird application.

Note that the proposed CVSS score serves as a starting point to support further 
discussion. Please feel free to reach out if you'd like to review or adjust it.

About the CVSS vector, it seems correct.


-- 
cheers,
        Holger

 ⢀⣴⠾⠻⢶⣦⠀
 ⣾⠁⢠⠒⠀⣿⡁  holger@(debian|reproducible-builds|layer-acht).org
 ⢿⡄⠘⠷⠚⠋⠀  OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C
 ⠈⠳⣄

It's the end of the world as we know it - and I feel fine.

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: rust-sequoia-octopus-librnp
Source-Version: 1.11.1-1
Done: Holger Levsen <hol...@debian.org>

We believe that the bug you reported is fixed in the latest version of
rust-sequoia-octopus-librnp, 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 1109...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Holger Levsen <hol...@debian.org> (supplier of updated 
rust-sequoia-octopus-librnp 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 ftpmas...@ftp-master.debian.org)


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

Format: 1.8
Date: Wed, 09 Jul 2025 14:49:09 +0200
Source: rust-sequoia-octopus-librnp
Architecture: source
Version: 1.11.1-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Rust Maintainers 
<pkg-rust-maintain...@alioth-lists.debian.net>
Changed-By: Holger Levsen <hol...@debian.org>
Closes: 1109001
Changes:
 rust-sequoia-octopus-librnp (1.11.1-1) unstable; urgency=medium
 .
   * Package sequoia-octopus-librnp 1.11.1 from crates.io using debcargo 2.7.8
     - Closes: #1109001.
     - refresh patches.
Checksums-Sha1:
 46cd817186275a65419b064a89a416cb470c417a 3876 
rust-sequoia-octopus-librnp_1.11.1-1.dsc
 29afad49ff7cdb67912e5b27587ca3054596c06f 155337 
rust-sequoia-octopus-librnp_1.11.1.orig.tar.gz
 870cebe7a577b4322ba6c3d8d5c71fb3ba1fd236 6160 
rust-sequoia-octopus-librnp_1.11.1-1.debian.tar.xz
 9a873d6f7950ee6c1ec106f4d9d82ccbade10b1d 7234 
rust-sequoia-octopus-librnp_1.11.1-1_source.buildinfo
Checksums-Sha256:
 1397d2bfb1c7a383d4f3fa23e5df80b6e48e6234675b9d34839b19ed2503f896 3876 
rust-sequoia-octopus-librnp_1.11.1-1.dsc
 7cec5eac6fa7fa05b1eb301901bf5aa16bf950d352a98799157dd12af910e342 155337 
rust-sequoia-octopus-librnp_1.11.1.orig.tar.gz
 9cbd68f15cd7a5a062ca1083ea792261f21808d6c55613767ab69b463a69c9fd 6160 
rust-sequoia-octopus-librnp_1.11.1-1.debian.tar.xz
 7f1d4e02df0a03bb135d57bb2aab37349a2baa53a16af2dd23a6b2517f440d2e 7234 
rust-sequoia-octopus-librnp_1.11.1-1_source.buildinfo
Files:
 f858762e64b943befd49691a64a1c8d5 3876 rust optional 
rust-sequoia-octopus-librnp_1.11.1-1.dsc
 aa7b448967f4c8d40ab2604c5d30bdba 155337 rust optional 
rust-sequoia-octopus-librnp_1.11.1.orig.tar.gz
 fb2f49e83b5b72e97a434462f5b65c56 6160 rust optional 
rust-sequoia-octopus-librnp_1.11.1-1.debian.tar.xz
 b920cebaea2aa089a73c1f429e4615bd 7234 rust optional 
rust-sequoia-octopus-librnp_1.11.1-1_source.buildinfo

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

iQIzBAEBCgAdFiEEuL9UE3sJ01zwJv6dCRq4VgaaqhwFAmhuZUgACgkQCRq4Vgaa
qhzMxg//d0vKJKELQlKcOPX3wmBRc3Jl9OQpjolfmhcqk5ZbgZ634y092/9vroL0
s2MNxmQyXsUP83poG6UgIeKF3iRNtNX1Hq3pIdZyAg+JwH7PIe80u/YrUaG3zwgr
uOo5Anmtxv+xafMtMTDlNUUtKOdFmUihr5Vg4PhvO+SB6qqd/WMVluN+ngeZ0f+j
LbndLguHQEfW6pHmVE7CEhREt5vt+KaEpAvLWwLFvGf85r7Aw3zBX1Hi1+ESexMw
dZu68n5Gp2KRypZiVws3FdFWBt54X66ATZ3Jy6ViHWGTVEd9iJ4VK1GsvPREKF1S
6fHXQwYmUFsCX1BFfTVrc8pXHt6OCszbVnINMnZN+Tifltrmw99UYGDe5dOwtYTA
8KCI3aLKejGTHI3zwbOW7TSX7py979FBFC5v1Dvt6z5jdT3fakklz7Xcm0zwfrkz
IjmcEphKCJdHWumTZUeIm2i/dBM6xprKUHYegA3TCE8VbRoAmr91BUjJEQ7xfmMW
XppSVP1HrUbRV6xpREjt4fx6iDY/VVGQWHw50HjkmWwxg5a1xbhks24DPBvRISxI
7q5ru0yyk7HuIMEaz21DI8jSIcvxISYunvRrdXugNFOzCxDzj+AB+eJueh5sf/N/
sHBzXp6ITIU9oLkVyJbVXkVj2EVsiNZtRYVCEuPVJOitYqxlu1k=
=QUri
-----END PGP SIGNATURE-----

Attachment: pgpoUUE9vXhai.pgp
Description: PGP signature


--- End Message ---

Reply via email to