CVE-2022-3437 third_party/heimdal: Check the result of _gsskrb5_get_mech()
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 15 Aug 2022 04:53:55 +0000 (16:53 +1200)
committerJule Anger <janger@samba.org>
Tue, 25 Oct 2022 10:31:34 +0000 (10:31 +0000)
commit841b6ddcf2a80c085ed6159ec9d420f37ceb691e
treedf09199ffe1374ecca9c512db90ef9dfb6dd5068
parentba60f647524ec12b3b5901680c5922d6b2490420
CVE-2022-3437 third_party/heimdal: Check the result of _gsskrb5_get_mech()

We should make sure that the result of 'total_len - mech_len' won't
overflow, and that we don't memcmp() past the end of the buffer.

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
third_party/heimdal/lib/gssapi/krb5/decapsulate.c