Skip to content

fix(deps): update rust crate pgp to 0.14.0 [security]#4

Open
stackable-bot wants to merge 1 commit into
mainfrom
renovate/crate-pgp-vulnerability
Open

fix(deps): update rust crate pgp to 0.14.0 [security]#4
stackable-bot wants to merge 1 commit into
mainfrom
renovate/crate-pgp-vulnerability

Conversation

@stackable-bot

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
pgp dependencies minor 0.13.0 -> 0.14.0

GitHub Vulnerability Alerts

CVE-2024-53856

During a security audit, Radically Open Security discovered several reachable edge cases which allow an attacker to trigger rpgp crashes by providing crafted data.

Impact

When processing malformed input, rpgp can run into Rust panics which halt the program.

This can happen in the following scenarios:

  • Parsing OpenPGP messages from binary or armor format
  • Decrypting OpenPGP messages via decrypt_with_password()
  • Parsing or converting public keys
  • Parsing signed cleartext messages from armor format
  • Using malformed private keys to sign or encrypt

Given the affected components, we consider most attack vectors to be reachable by remote attackers during typical use cases of the rpgp library. The attack complexity is low since the malformed messages are generic, short, and require no victim-specific knowledge.

The result is a denial-of-service impact via program termination. There is no impact to confidentiality or integrity security properties.

Versions and Patches

All recent versions are affected by at least some of the above mentioned issues.

The vulnerabilities have been fixed with version 0.14.1. We recommend all users to upgrade to this version.

References

The security audit was made possible by the NLnet Foundation NGI Zero Core grant program for rpgp.

CVE-2024-53857

During a security audit, Radically Open Security discovered two vulnerabilities which allow attackers to trigger resource exhaustion vulnerabilities in rpgp by providing crafted messages. This affects general message parsing and decryption with symmetric keys.

Impact

Affected rpgp versions do not correctly set upper limits on the total reserved amount of memory when parsing long sequences of partial OpenPGP packets, which can grow to to several GiB in size. Additionally, up to 4GiB of memory is reserved for OpenPGP packets of fixed size with large length fields, even if less data is received.
Depending on existing message size restrictions and available system resources, this can cause out-of-memory conditions and crash the rpgp process or cause other system instability through memory resource exhaustion when parsing crafted messages.

Affected rpgp versions are susceptible to excessive memory allocation with values of up to 2TiB or long processing times for some decryption operations which involve the Argon2 function. An attacker can provide a valid Symmetric Key Encrypted Session Key packet (SKESK) which uses Argon2 for String-to-Key hashing with parameters that are excessive, but within specification limits of the RFC9580 OpenPGP standard. Since rpgp did not further restrict the Argon2 parameters, this can cause out-of-memory conditions and crash the rpgp process. Under some conditions, the memory resource exhaustion may trigger other system instability. Alternatively, this can make the program unresponsive via long computations. The attacker needs to trick a victim into attempting decryption, but does not require knowledge of the symmetric secret used by the victim.

There is no impact to confidentiality or integrity security properties.

Versions and Patches

The impact details on the message parsing component varies with different versions. We've confirmed some of the problematic behavior on older versions such as v0.10.0 and see all recent versions as affected in some form.

The affected Argon2 functionality was introduced with v0.12.0-alpha.1, earlier versions are not vulnerable.

The vulnerabilities have been fixed with version 0.14.2. We recommend all users to upgrade to this version.

References

The security audit was made possible by the NLnet Foundation NGI Zero Core grant program for rpgp.


Release Notes

rpgp/rpgp (pgp)

v0.14.2

Compare Source

🐛 Bug Fixes
  • Fix CVE-2024-53857 "Potential Resource Exhaustion when handling Untrusted Messages"
📚 Documentation

v0.14.1

Compare Source

⛰️ Features
🐛 Bug Fixes
  • Fix CVE-2024-53856: "Panics on Malformed Untrusted Input"
  • Make strip_leading_zeros_vec() work correctly - (57e11c5)
  • Csf normalization for signing - (8439a6d)
  • Extend is_signing_key() and is_encryption_key() for RFC 9580 algorithms (#​434) - (a1d9d5c)
  • Enable the zeroize feature for argon2 and sha1-checked (#​440) - (0c45660)
🚜 Refactor
  • Optimize Display implementation for BlockType - (00b5027)
  • Merge write_packet_len into write_packet_length - (33dcc83)
🧪 Testing
  • Avoid writing to the crate source unnecessarily during tests (#​431) - (3a1bb5c)
⚙️ Miscellaneous Tasks
  • Remove unused and erratic end_of_line() fn (#​421) - (69ab41c)
  • Relax dependencies - (c6662a3)
  • Adjust allowed licenses to match what we're using (#​438) - (910d9af)
  • Use prepend for changelog gen - (7a60d1a)

v0.14.0

Compare Source

⛰️ Features
  • Improve more debug impls - (3d73320)
  • Password protection removal and setting for secret key packets - (700cba2)
  • Improve API of LiteralData to provide more flexibility - (34728e0)
  • Rfc9580 keys - (f09666c)
  • Make SignatureConfig::hash_signature_data more flexible - (c6d6b2c)
  • Rfc9580 encryption - (5d3547a)
🐛 Bug Fixes
  • Decrypted data must contain exactly one message - (00ee8ee)
  • V6 ESK may only be combined with v2 SEIPD - (5ec3578)
  • Parameter ordering for set_password - (39dd449)
  • Add special error message for packet 20 - (49c8403)
  • Revert to producing short padding for ecdh - (7c94189)
  • Parameter name - (c9cdfaf)
  • Reject unknown critical subpackets while hashing for signature verification - (b8b43a7)
  • Implement various constraints that rfc 9580 mandates - (5682b08)
  • Limit the use of S2K KDF with weak hash algorithms - (cb26cfd)
  • When verifying signatures, check alignment between key version and signature version - (b771b78)
  • Message parser: drop esk packets with versions that are not aligned with the encrypted container - (5b27240)
  • Fail composed key parsing on hard errors during packet parsing - (a9de958)
🚜 Refactor
  • Remove bigger macros in favor of direct types - (0b1d778)
  • Smaller refactors - (8dcba01)
  • Derive debug impls - (d714064)
  • Remove unused Deserialize trait - (b18f046)
  • Cleanup and improve Mpi API - (1803407)
📚 Documentation
🧪 Testing
  • Roundtrip ecdh test against rPGP 0.10 - (1dd91ea)
  • Ignore another sks-dump test failure - (1c0cd84)
  • Rename "opengpg-interop" to "openpgp-interop" - (f3292f7)
  • Skip writing files by default (#​404) - (6e51094)
  • Add signature verification tests (RFC 9580 Annex A.6 and A.7) (#​409) - (0439dd5)
  • Exercise SEIPDv2 encrypt/decrypt for a range of message sizes - (f9c48dd)
⚙️ Miscellaneous Tasks
  • Rename PublicKeyAlgorithm::EdDSA to EdDSALegacy - (d30ce26)
  • Rename PublicKeyTrait::to_writer_old into serialize_for_hashing - (017be15)
  • Bump MSRV to 1.75 - (67551a8)
  • Update push from master to main (#​386) - (7b5f5b7)
  • Use write_u8 - (882dcc3)
  • Add cargo deny check - (d4a7905)
  • Add PkeskVersion, SkeskVersion types - (bc79460)
  • Rework ecdh public params to be able to represent opaque data - (276768e)

v0.13.2

Compare Source

🐛 Bug Fixes
  • Revert to producing short padding for ecdh - (e60ecdf)
  • Revert to producing short padding for ecdh. (#​385) - (c5df70c)
🧪 Testing
  • Roundtrip ecdh test against rPGP 0.10 - (d8b2058)
⚙️ Miscellaneous Tasks
  • Update msrv and branch conditoins - (1710ef3)

v0.13.1

Compare Source

🐛 Bug Fixes
  • Remove stray eprintln - (683c529)
📚 Documentation
  • (readme) Fix the example - (cd7a253)
  • (readme) Some more example adjustments - (99daf15)
⚙️ Miscellaneous Tasks

Configuration

📅 Schedule: Branch creation - "" in timezone Europe/Berlin, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| crate      | pgp     | 0.13.0 | 0.14.2 |
@stackable-bot stackable-bot added the dependencies Pull requests that update a dependency file label Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant