Lars Maes
2016-Jun-07 06:59 UTC
[Samba] Segfault when trying to generate keytab with samba 4.2.10
Of course i can! Hereby the backtrace with symbols: Program received signal SIGSEGV, Segmentation fault. free_PrincipalName (data=data at 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 at entry=0x45) at default/source4/heimdal/lib/asn1/asn1_krb5_asn1.c:961 #1 0x00007fffef9d4639 in free_Principal (data=data at entry=0x45) at default/source4/heimdal/lib/asn1/asn1_krb5_asn1.c:1123 #2 0x00007ffff7991fb1 in krb5_free_principal (context=context at entry=0x0, p=0x45) at ../source4/heimdal/lib/krb5/principal.c:84 #3 0x00007ffff79856c4 in krb5_kt_free_entry (context=0x0, entry=entry at entry=0x7fffffffdb70) at ../source4/heimdal/lib/krb5/keytab.c:709 #4 0x00007ffff3cc08e5 in smb_krb5_kt_free_entry (context=<optimized out>, kt_entry=kt_entry at 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: > > Program received signal SIGSEGV, Segmentation fault. > 0x00007fffef9d3f69 in free_PrincipalName () from /usr/lib/x86_64-linux-gnu/samba/libasn1-samba4.so.8 > > I am using samba 4.2.10 from Debian. > > Deb8u3 package > > Anyone knows how to fix this?Can you run this under gdb and get a full backtrace please (with symbols).
Jeremy Allison
2016-Jun-08 21:52 UTC
[Samba] Segfault when trying to generate keytab with samba 4.2.10
On Tue, Jun 07, 2016 at 06:59:56AM +0000, Lars Maes wrote:> Of course i can! > > Hereby the backtrace with symbols: > > Program received signal SIGSEGV, Segmentation fault. > free_PrincipalName (data=data at 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 at entry=0x45) at default/source4/heimdal/lib/asn1/asn1_krb5_asn1.c:961 > #1 0x00007fffef9d4639 in free_Principal (data=data at entry=0x45) at default/source4/heimdal/lib/asn1/asn1_krb5_asn1.c:1123 > #2 0x00007ffff7991fb1 in krb5_free_principal (context=context at entry=0x0, p=0x45) at ../source4/heimdal/lib/krb5/principal.c:84 > #3 0x00007ffff79856c4 in krb5_kt_free_entry (context=0x0, entry=entry at entry=0x7fffffffdb70) at ../source4/heimdal/lib/krb5/keytab.c:709 > #4 0x00007ffff3cc08e5 in smb_krb5_kt_free_entry (context=<optimized out>, kt_entry=kt_entry at 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:961Can you try the following patch ? Thanks, Jeremy.
Jeremy Allison
2016-Jun-08 21:57 UTC
[Samba] Segfault when trying to generate keytab with samba 4.2.10
On Wed, Jun 08, 2016 at 02:52:27PM -0700, Jeremy Allison wrote:> On Tue, Jun 07, 2016 at 06:59:56AM +0000, Lars Maes wrote: > > Of course i can! > > > > Hereby the backtrace with symbols: > > > > Program received signal SIGSEGV, Segmentation fault. > > free_PrincipalName (data=data at 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 at entry=0x45) at default/source4/heimdal/lib/asn1/asn1_krb5_asn1.c:961 > > #1 0x00007fffef9d4639 in free_Principal (data=data at entry=0x45) at default/source4/heimdal/lib/asn1/asn1_krb5_asn1.c:1123 > > #2 0x00007ffff7991fb1 in krb5_free_principal (context=context at entry=0x0, p=0x45) at ../source4/heimdal/lib/krb5/principal.c:84 > > #3 0x00007ffff79856c4 in krb5_kt_free_entry (context=0x0, entry=entry at entry=0x7fffffffdb70) at ../source4/heimdal/lib/krb5/keytab.c:709 > > #4 0x00007ffff3cc08e5 in smb_krb5_kt_free_entry (context=<optimized out>, kt_entry=kt_entry at 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 > > Can you try the following patch ?Arggg. ENOPATCH :-). Patch now attached...