xref: /freebsd/crypto/krb5/src/tests/t_cve-2013-1416.py (revision 7f2fe78b9dd5f51c821d771b63d2e096f6fd49e9)
1*7f2fe78bSCy Schubertfrom k5test import *
2*7f2fe78bSCy Schubert
3*7f2fe78bSCy Schubertrealm = K5Realm()
4*7f2fe78bSCy Schubert
5*7f2fe78bSCy Schubert# CVE-2013-1416 KDC dereferences null pointer
6*7f2fe78bSCy Schubert
7*7f2fe78bSCy Schubertrealm.kinit(realm.user_princ, password('user'))
8*7f2fe78bSCy Schubertrealm.run([kvno, '/test'], expected_code=1)
9*7f2fe78bSCy Schubertrealm.run([kvno, 'test/'], expected_code=1)
10*7f2fe78bSCy Schubertrealm.run([kvno, '/'], expected_code=1)
11*7f2fe78bSCy Schubert# Make sure KDC is still running.
12*7f2fe78bSCy Schubertrealm.kinit(realm.user_princ, password('user'))
13*7f2fe78bSCy Schubertsuccess('CVE-2013-1416 regression test')
14