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>