]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix bug #9213 - Bad ASN.1 NegTokenInit packet can cause invalid free.
authorJeremy Allison <jra@samba.org>
Tue, 25 Sep 2012 23:35:09 +0000 (16:35 -0700)
committerKarolin Seeger <kseeger@samba.org>
Fri, 28 Sep 2012 07:19:13 +0000 (09:19 +0200)
Not the correct fix for the specific issue, but a general fix to
make sure this can never happen again.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 26 04:07:57 CEST 2012 on sn-devel-104
(cherry picked from commit 83f60672e1b3069e6b1b90b376460da895e37df3)

source3/libsmb/clispnego.c

index 0a907ba7197d3fbbd15fe68b70aab53358cf28be..a97e1dc81e65ee34eddf119fc077abc6ec6fde17 100644 (file)
@@ -103,6 +103,10 @@ bool spnego_parse_negTokenInit(TALLOC_CTX *ctx,
        bool ret;
        ASN1_DATA *data;
 
+       for (i = 0; i < ASN1_MAX_OIDS; i++) {
+               OIDs[i] = NULL;
+       }
+
        data = asn1_init(talloc_tos());
        if (data == NULL) {
                return false;