Home GnuPG
Diffusion GnuPG 11b7e4139e82

gpg: Fix possible NULL-deref with overlong signature packets.

Description

gpg: Fix possible NULL-deref with overlong signature packets.

* g10/parse-packet.c (parse_signature): Retrun an error for overlong
subpacket area

Updates-commit: 36dbca3e6944d13e75e96eace634e58a7d7e201d
Resported-by: OpenAI Security Research

A way to generate too long signature packets is:

$ echo hallo | gpg -z0 -s -o x30001.sig \
  -N foo@gnupg.org="$(awk 'BEGIN{for(i=0;i<29917;i++){printf"a"}}')"

This is just one byte too long.

  • GnuPG-bug-id: T8049
  • Co-authored-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
wernerAuthored on Mon, Jan 26, 11:56 AM
Parents
rG93fa34d9a346: tpm: Fix possible buffer overflow in PKDECRYPT
Branches
Unknown
Tags
Unknown
Tasks
T8049: Null pointer dereference with overlong signature packet