Page MenuHome GnuPG

Parsing AEAD preference string parsing causes reads uninitialized memory
Closed, ResolvedPublic


Using the following configuration in gpg.conf:

personal-aead-preferences OCB

causes gpg commands to crash with the following steps:

$ gpg --quick-gen-key testkey
$ gpg -aer testkey
gpg: unsupported AEAD algo -6
gpg: unsupported AEAD algo -6
gpg: Ohhhh jeeee: Assertion "a->filter == block_filter" in iobuf_set_partial_body_length_mode failed (iobuf.c:2764)
Aborted (core dumped)

(the particular AEAD algo number differs based on the invocation as it is uninitialized variable)

After some digging, I found out that the parsing of the preference string in regards to the AEAD is wrong and addresses sym list, which is uninitialized so the fix should be simple as attached:

Unfortunately, I am not familiar with the gnupg tests so if you want me to implement some regression tests, please direct me to the right place where to put one.


Revisions and Commits

Related Objects