Created attachment 16325 [details] backtrace Environment: Ubuntu 16.04.7 LTS Linux fs 4.4.0-193-generic #224-Ubuntu SMP Tue Oct 6 17:15:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux ii libwbclient0:amd64 99:4.12.10-9 amd64 Glue package for sernet-samba-libs. ii sernet-samba 99:4.12.10-9 amd64 SMB/CIFS file, print, and login server for Unix ii sernet-samba-ad 99:4.12.10-9 amd64 Samba Active Directory Domain Controller ii sernet-samba-client 99:4.12.10-9 amd64 a LanManager-like simple client for Unix ii sernet-samba-common 99:4.12.10-9 all Samba common files used by both the server and the client ii sernet-samba-dbg 99:4.12.10-9 amd64 Samba debugging symbols ii sernet-samba-keyring 1.10 all GnuPG archive keys of the SerNet Samba archive ii sernet-samba-libs:amd64 99:4.12.10-9 amd64 Samba common library files used by both the server and the client ii sernet-samba-libsmbclient0:amd64 99:4.12.10-9 amd64 Shared library that allows applications to talk to SMB servers ii sernet-samba-winbind 99:4.12.10-9 amd64 Samba nameservice integration server Problem: After upgrading from Samba 4.10.18 to 4.12.9 the smbd process crashes with INTERNAL ERROR the first time a Windows client connects. This can be reliably reproduced. The crash also happens when enumerating a printer. I have attached packet capture, full backtrace and debug log. Thanks!
Created attachment 16326 [details] packet capture
Created attachment 16327 [details] client debug log
Problem looks to be here in source3/rpc_server/spoolss/srv_spoolss_nt.c: 1883 if (!user_ok_token(uidtoname(p->session_info->unix_token->uid), NULL, 1884 p->session_info->security_token, snum) || user_ok_token() takes parameters: bool user_ok_token(const char *username, const char *domain, const struct security_token *token, int snum); This is the only place in smbd where 'const char *domain' is being passed in as NULL.
Created attachment 16328 [details] Test patch. Can you try the following patch ? Looks like the spoolss code got missed when the calls to user_ok_token() got updated.
rebuilding now. FWIW, I see the problem on connecting to shares as well. My prediction is that the patch will help with printing, but I think there is something else going on.
Having a problem rebuilding.... I'm getting the following error: [ 900/4426] Compiling source4/heimdal/lib/roken/rtbl.c In file included from ../../third_party/aesni-intel/aesni-intel_asm.c:44:0: ../../third_party/aesni-intel/inst-intel.h:15:2: error: expected identifier or ‘(’ before ‘.’ token .macro R32_NUM opd r32 ^ ../../third_party/aesni-intel/inst-intel.h:16:2: error: stray ‘\’ in program \opd = REG_NUM_INVALID ^ It must be my build environment.... ubuntu-xenial schroot env... What should I be looking for?
(In reply to Bo Kersey from comment #6) updated debian/rules so that aesni is not built for amd64 - should not cause problems with testing, but seems to be working now.
(In reply to Jeremy Allison from comment #4) Jeremy, the patch that you provided works. I'm always amazed at your expertise in pin pointing problems and providing fixes. I testing by bringing up the same windows client and accessing the printer. That was good, so I rebooted the machine, logged back in to see if there were other issues accessing the file server and there were none. Printed a test page and there were no errors. Thanks! Bo
MR: https://gitlab.com/samba-team/samba/-/merge_requests/1669
This bug was referenced in samba master: e5e1759057a767f517bf480a2172a36623df2799
*** Bug 14569 has been marked as a duplicate of this bug. ***
Created attachment 16331 [details] git-am fix for 4.12.next, 4.13.next. Cherry-picked from master. Applies cleanly to 4.13.next, 4.12.next.
Re-assigned to Karolin for inclusion in 4.12.next, 4.13.next.
*** Bug 14572 has been marked as a duplicate of this bug. ***
(In reply to Jeremy Allison from comment #13) Pushed to autobuild-v4-{13,12}-test.
This bug was referenced in samba v4-13-test: 7e9d27271db00db8610eeabdebb49d59f03345ac
This bug was referenced in samba v4-12-test: 58eaf85bd924f4f9264d677486c0122a5a2c9f9f
Pushed to both branches. Closing out bug report. Thanks!
This bug was referenced in samba v4-13-stable (Release samba-4.13.3): 7e9d27271db00db8610eeabdebb49d59f03345ac
This bug was referenced in samba v4-12-stable (Release samba-4.12.11): 58eaf85bd924f4f9264d677486c0122a5a2c9f9f