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>
Mon, 24 Oct 2022 05:27:37 +0000 (07:27 +0200)
commitde77f0159873fb0c569c02cee5aa492af8e3f461
treed869a59f47c9b3384f81c725409f9da4ad88cf73
parente1c2e2836efaa895d817b5611bf908284c3d415d
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