Home GnuPG
Diffusion GnuPG 9e8e48e00b85

gpg: Avoid wrong decryption_failed for signed+OCB msg w/o pubkey.

Description

gpg: Avoid wrong decryption_failed for signed+OCB msg w/o pubkey.

* g10/decrypt-data.c (struct decode_filter_context_s): Add flag
checktag_failed.
(aead_checktag): Set flag.
(decrypt_data): Initially clear that flag and check the flag after the
decryption.
* g10/mainproc.c (proc_encrypted): Revert the log_get_errorcount based
check.

This fixes a bug where for an OCB encrypted and signed message with
the signing key missing during decryption the DECRYPTION_FAILED status
line was printed along with "WARNING: encrypted message has been
manipulated". This was because we use log_error to show that the
signature could not be verified due to the missing pubkey; the
original fix looked at the error counter and thus triggered the
decryption failed status.

Details

Provenance
wernerAuthored on Sep 19 2024, 10:00 AM
Parents
rGd9fdc165e657: agent: Fix detection of the trustflag de-vs.
Branches
Unknown
Tags
Unknown
Tasks
T7042: AEAD mode does not properly handle modified cipher text