Created attachment 12168 [details] git-am fix for master. Submitted to samba-technical. Backtrace from a user: Program received signal SIGSEGV, Segmentation fault. free_PrincipalName (data=data@entry=0x45) at default/source4/heimdal/lib/asn1/asn1_krb5_asn1.c:961 961 default/source4/heimdal/lib/asn1/asn1_krb5_asn1.c: No such file or directory. (gdb) bt #0 free_PrincipalName (data=data@entry=0x45) at default/source4/heimdal/lib/asn1/asn1_krb5_asn1.c:961 #1 0x00007fffef9d4639 in free_Principal (data=data@entry=0x45) at default/source4/heimdal/lib/asn1/asn1_krb5_asn1.c:1123 #2 0x00007ffff7991fb1 in krb5_free_principal (context=context@entry=0x0, p=0x45) at ../source4/heimdal/lib/krb5/principal.c:84 #3 0x00007ffff79856c4 in krb5_kt_free_entry (context=0x0, entry=entry@entry=0x7fffffffdb70) at ../source4/heimdal/lib/krb5/keytab.c:7 +09 #4 0x00007ffff3cc08e5 in smb_krb5_kt_free_entry (context=<optimized out>, kt_entry=kt_entry@entry=0x7fffffffdb70) at ../lib/krb5_wrap +/krb5_samba.c:1247 #5 0x00007ffff6384c6d in ads_keytab_create_default (ads=<optimized out>) at ../source3/libads/kerberos_keytab.c:750 #6 0x0000555555596190 in net_ads_keytab_create (c=0x55555584e5b0, argc=<optimized out>, argv=<optimized out>) at ../source3/utils/net +_ads.c:2507 #7 0x00005555555921d9 in net_ads_keytab (c=0x55555584e5b0, argc=1, argv=0x55555584ecd8) at ../source3/utils/net_ads.c:2576 #8 0x0000555555598ea4 in net_ads (c=<optimized out>, argc=<optimized out>, argv=<optimized out>) at ../source3/utils/net_ads.c:3329 #9 0x000055555557885a in main (argc=5, argv=0x7fffffffebb8) at ../source3/utils/net.c:961 > Hi All, > > Whe tryin to use: net ads keytab create, I get the following segfault:
Hmmm. Probably only 4.2.x is vulnerable to this as 4.3.x and above initialize krb5_kt_cursor cursor = {0}; and krb5_keytab_entry kt_entry = {0};. Still, it's very untidy error cleanup.
We need this all the way back to 4.2 for Debian, where this has been seen by upgrading users after the backlock release.
Well the patch applies cleanly to master, 4.4.x, 4.3.x, 4.2.x so once it's +1'ed and in master I'll cherry-pick for the back-port.
Created attachment 12173 [details] git-am fix for 4.4.next, 4.3.next, 4.2.next Cherry-pick from master. Applies cleanly to 4.4.next, 4.3.next, 4.2.next.
Assigning to Karolin for inclusion in 4.2.next, 4.3.next, 4.4.next.
(In reply to Uri Simchoni from comment #5) Pushed to autobuild-v4-[4|3|2]-test.
(In reply to Karolin Seeger from comment #6) Pushed to all branches. Closing out bug report. Thanks!