CVE-2022-3437 third_party/heimdal: Pass correct length to _gssapi_verify_pad()
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 12 Oct 2022 00:57:33 +0000 (13:57 +1300)
committerJule Anger <janger@samba.org>
Mon, 24 Oct 2022 05:27:37 +0000 (07:27 +0200)
commit5c31d5beb3bed6b28c8d648d889c47e69c16cc8e
treef4b46462c143360f6b009007f835b84743ae2fbb
parent22dd9072c9f964931db931ee0b638a9799e947ca
CVE-2022-3437 third_party/heimdal: Pass correct length to _gssapi_verify_pad()

We later subtract 8 when calculating the length of the output message
buffer. If padlength is excessively high, this calculation can underflow
and result in a very large positive value.

Now we properly constrain the value of padlength so underflow shouldn't
be possible.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15134

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/knownfail.d/heimdal-des-overflow [deleted file]
third_party/heimdal/lib/gssapi/krb5/unwrap.c