<div dir="ltr">Hi Gnupg developers,<br><br>I'm submitting a fix for CVE-2025-68972, a signature verification bypass <br>in GnuPG 2.4.x documented at <a href="https://gpg.fail/formfeed">https://gpg.fail/formfeed</a>.<br><br><b>Summary</b><br>The vulnerability allows an attacker to extend signed messages with <br>arbitrary data that still passes signature verification. This occurs <br>because commit 976e9d608 (Nov 2022) added form feed (\f) insertion for <br>truncated lines but did not add corresponding detection during signature <br>verification.<br><br><b>Root Cause</b><br>In g10/armor.c (line 784), truncated lines get a form feed character:<br>    afx->buffer[afx->buffer_len++] = this_truncated? '\f':'\n';<br><br>However, g10/plaintext.c's handle_plaintext() function does not check <br>for '\f' during hash calculation, allowing the exploit described at <br><a href="https://gpg.fail/formfeed">https://gpg.fail/formfeed</a>.<br><br><b>The Fix</b><br>The attached patch (CVE-2025-68972.patch) adds form feed detection in the cleartext signature <br>hash calculation state machine. When '\f' is encountered, the function <br>logs an error and fails with GPG_ERR_BAD_SIGNATURE.<br><br><br>I'm happy to provide additional information, make adjustments to the <br>patch, or answer any questions.<br><br>Best regards,<br>Shani Yosef</div>