Skip to content

Commit

Permalink
Add test case for CVE-2013-1416
Browse files Browse the repository at this point in the history
ticket: 7635 (new)
  • Loading branch information
tlyu committed May 9, 2013
1 parent efa3178 commit ab8aa58
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/tests/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions src/tests/t_cve-2013-1416.py
Original file line number Diff line number Diff line change
@@ -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')

0 comments on commit ab8aa58

Please sign in to comment.