[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: golang-go.crypto / CVE-2019-11841

Ola Lundqvist <ola@inguza.com> writes:

> Looking at the code and your email I have some concerns.
> Isn't the header part of the "signed" argument? If it is not, then there is
> no point of checking it since you can then just change the header anyway.
> If it is part of the signed message it is possible for the function to
> decode it and check it.
> Do the calling application need to do the check, can't
> CheckDetachedSignature do it?
> Or have I missed something?

CheckDetachedSignature is called like:

openpgp.CheckDetachedSignature(keyring, bytes.NewBuffer(b.Bytes), b.ArmoredSignature.Body)

b.Headers has the header we need to check, but we only pass the body
b.Bytes and the signature b.ArmoredSignature.Body. As in the headers
aren't covered by the signature (I assume there is a good reason...).

Does this make sense now?
Brian May <bam@debian.org>

Reply to: