Page MenuHome GnuPG

Cleartext Signature Forgery in GnuPG
Testing, NormalPublic

Description

[ Note that this is also the parent ticket for a couple of other reports by the same source]

In GnuPG implementation, g10/armor.c, the function parse_hash_header has an argument LINE and not have length of line.

When the header line input has is something like (expressed by C-escape for the NULL byte):

Hash: SHA256\x00....

The string after the NULL byte is ignored and it won't included in the computation of the signature.

This could be abused by an attacker and a user would see the string as if it's covered by the signature.


Reported-by: 49016 and Liam (two-heart)

Event Timeline

gniibe shifted this object from the S1 Public space to the Restricted Space space.
gniibe changed the visibility from "Public (No Login Required)" to "g10code (Project)".
gniibe changed the edit policy from "All Users" to "g10code (Project)".
gniibe mentioned this in Unknown Object (Maniphest Task).Nov 10 2025, 2:51 AM
werner shifted this object from the Restricted Space space to the S1 Public space.Fri, Dec 26, 2:52 PM
werner changed the visibility from "g10code (Project)" to "All Users".
werner removed a project: g10code.
werner added a subscriber: werner.

Regarding the cleartext signature please see this piece: https://gnupg.org/blog/20251226-cleartext-signatures.html

werner triaged this task as Normal priority.Mon, Dec 29, 4:54 PM
werner edited projects, added OpenBSD, Not A Bug; removed Bug Report.
werner changed the task status from Open to Testing.Fri, Jan 2, 4:37 PM

(Testing for now for better visibility. Real or Semi-real bugs with fixes are already set to Resolved)

werner changed the visibility from "All Users" to "Public (No Login Required)".Mon, Jan 5, 11:26 AM
pl13 mentioned this in Unknown Object (Maniphest Task).Mon, Jan 12, 9:31 AM
werner set External Link to https://gnupg.org/blog/20251226-cleartext-signatures.html.Thu, Jan 15, 4:05 PM