CVE-2022-3437 source4/heimdal: Pass correct length to _gssapi_verify_pad()
commite9db03736007721e37c4fba847ce4aa0c4520924
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 12 Oct 2022 00:57:33 +0000 (12 13:57 +1300)
committerJule Anger <janger@samba.org>
Mon, 24 Oct 2022 05:27:02 +0000 (24 07:27 +0200)
tree582cc57820f46b76c55780e4ee57c452d38be550
parent77e0f2febaaf4d6e5e42f8e73a1f8f3c0e4a2985
CVE-2022-3437 source4/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]
source4/heimdal/lib/gssapi/krb5/unwrap.c