]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Add test case for CVE-2013-1416
authorTom Yu <tlyu@mit.edu>
Thu, 9 May 2013 20:51:31 +0000 (16:51 -0400)
committerTom Yu <tlyu@mit.edu>
Thu, 9 May 2013 22:16:46 +0000 (18:16 -0400)
ticket: 7635 (new)

src/tests/Makefile.in
src/tests/t_cve-2013-1416.py [new file with mode: 0644]

index 55a323789620357e5f1e04cf90f8ac7a2af41dba..23684c0106fc581441c09331dd997746c1c6bcbb 100644 (file)
@@ -101,6 +101,7 @@ check-pytests:: gcred hist kdbtest t_localauth
        $(RUNPYTEST) $(srcdir)/t_kdb.py $(PYTESTFLAGS)
        $(RUNPYTEST) $(srcdir)/t_cve-2012-1014.py $(PYTESTFLAGS)
        $(RUNPYTEST) $(srcdir)/t_cve-2012-1015.py $(PYTESTFLAGS)
+       $(RUNPYTEST) $(srcdir)/t_cve-2013-1416.py $(PYTESTFLAGS)
 
 clean::
        $(RM) gcred hist kdbtest krb5.conf kdc.conf t_localauth
diff --git a/src/tests/t_cve-2013-1416.py b/src/tests/t_cve-2013-1416.py
new file mode 100644 (file)
index 0000000..94fb6d5
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/python
+
+from k5test import *
+
+realm = K5Realm()
+
+# CVE-2013-1416 KDC dereferences null pointer
+
+realm.kinit(realm.user_princ, password('user'))
+realm.run([kvno, '/test'], expected_code=1)
+realm.run([kvno, 'test/'], expected_code=1)
+realm.run([kvno, '/'], expected_code=1)
+# Make sure KDC is still running.
+realm.kinit(realm.user_princ, password('user'))
+success('CVE-2013-1416 regression test')