Bug 14787 - net conf list crashes when run as normal user
Summary: net conf list crashes when run as normal user
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Clustering (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-07 08:35 UTC by Ralph Böhme
Modified: 2021-09-07 11:50 UTC (History)
2 users (show)

See Also:


Attachments
Patch for 4.13, 4.14 and 4.15 cherry-picked from master (2.68 KB, patch)
2021-09-05 13:42 UTC, Ralph Böhme
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2021-08-07 08:35:42 UTC
#0  0x00007fffeeef3387 in raise () from /lib64/libc.so.6
#1  0x00007fffeeef4a78 in abort () from /lib64/libc.so.6
#2  0x00007ffff5c2c78d in smb_panic_default (why=0x7fffed2027b7 "messaging not initialized\n") at ../../lib/util/fault.c:167
#3  0x00007ffff5c2cc09 in smb_panic (why=why@entry=0x7fffed2027b7 "messaging not initialized\n") at ../../lib/util/fault.c:200
#4  0x00007fffed1fb900 in messaging_ctdb_connection () at ../../source3/lib/messages_ctdb.c:284
#5  0x00007ffff62ec13e in db_open (mem_ctx=mem_ctx@entry=0x0, name=name@entry=0x555555870240 "/var/lib/gpfs-samba/registry.tdb", hash_size=hash_size@entry=0,
    tdb_flags=tdb_flags@entry=128, open_flags=open_flags@entry=2, mode=mode@entry=384, lock_order=lock_order@entry=DBWRAP_LOCK_ORDER_1, dbwrap_flags=dbwrap_flags@entry=0)
    at ../../source3/lib/dbwrap/dbwrap_open.c:158
#6  0x00007ffff62f8fa5 in regdb_init () at ../../source3/registry/reg_backend_db.c:741
#7  0x00007ffff62fc8e6 in registry_init_common () at ../../source3/registry/reg_init_basic.c:33
#8  0x00007ffff62e803a in registry_init_smbconf (keyname=keyname@entry=0x7ffff631dcb2 "HKLM\\SOFTWARE\\Samba\\smbconf") at ../../source3/registry/reg_init_smbconf.c:49
#9  0x00007ffff6318766 in smbconf_reg_init (ctx=0x55555586ff70, path=0x7ffff631dcb2 "HKLM\\SOFTWARE\\Samba\\smbconf") at ../../source3/lib/smbconf/smbconf_reg.c:606
#10 0x00007ffff62fde09 in smbconf_init_internal (mem_ctx=mem_ctx@entry=0x0, conf_ctx=conf_ctx@entry=0x7ffff654a548 <conf_ctx.31146>, path=path@entry=0x0,
    ops=ops@entry=0x7ffff654a460 <smbconf_ops_reg>) at ../../lib/smbconf/smbconf_util.c:59
#11 0x00007ffff631955c in smbconf_init_reg (mem_ctx=mem_ctx@entry=0x0, conf_ctx=conf_ctx@entry=0x7ffff654a548 <conf_ctx.31146>, path=path@entry=0x0)
    at ../../source3/lib/smbconf/smbconf_reg.c:1234
#12 0x00007ffff63179e0 in smbconf_init (mem_ctx=mem_ctx@entry=0x0, conf_ctx=conf_ctx@entry=0x7ffff654a548 <conf_ctx.31146>, source=source@entry=0x7ffff631c234 "registry:")
    at ../../source3/lib/smbconf/smbconf_init.c:72
#13 0x00007ffff62da626 in lp_smbconf_ctx () at ../../source3/param/loadparm.c:2143
#14 0x00007ffff62e4429 in process_registry_service (service_name=service_name@entry=0x7ffff631c30b "global") at ../../source3/param/loadparm.c:2199
#15 0x00007ffff62e45a0 in process_registry_globals () at ../../source3/param/loadparm.c:2260
#16 0x00007ffff62e477c in lp_include (lp_ctx=0x555555862280, service=0x0, pszParmValue=<optimized out>, ptr=0x7ffff654a690 <sDefault+240>) at ../../source3/param/loadparm.c:2475
#17 0x00007ffff1c44d42 in set_variable (on_globals=true, lp_ctx=0x555555862280, pszParmValue=0x55555586f658 "registry", pszParmName=0x55555586f650 "include",
    parm_ptr=<optimized out>, parmnum=186, service=0x0, mem_ctx=<optimized out>) at ../../lib/param/loadparm.c:1716
#18 lpcfg_do_global_parameter (lp_ctx=0x555555862280, pszParmName=0x55555586f650 "include", pszParmValue=0x55555586f658 "registry") at ../../lib/param/loadparm.c:1775
#19 0x00007ffff5c3c23c in parse_param (private_data=0x555555862280, pfunc=0x7ffff62dabc0 <do_parameter>, allow_empty_value=false, buf=0x55555586f650 "include")
    at ../../lib/util/tini.c:264
#20 tini_parse (f=f@entry=0x55555586f150, allow_empty_value=allow_empty_value@entry=false, sfunc=sfunc@entry=0x7ffff62e4110 <lp_do_section>,
    pfunc=pfunc@entry=0x7ffff62dabc0 <do_parameter>, private_data=private_data@entry=0x555555862280) at ../../lib/util/tini.c:309
#21 0x00007ffff5c3ea6c in pm_process (filename=filename@entry=0x55555586efa0 "/var/mmfs/ces/smb.conf", sfunc=sfunc@entry=0x7ffff62e4110 <lp_do_section>,
    pfunc=pfunc@entry=0x7ffff62dabc0 <do_parameter>, private_data=private_data@entry=0x555555862280) at ../../lib/util/params.c:99
#22 0x00007ffff62e5de4 in lp_load_ex (pszFname=pszFname@entry=0x7ffff5c85d92 "/var/mmfs/ces/smb.conf", global_only=global_only@entry=true,
    save_defaults=save_defaults@entry=false, add_ipc=add_ipc@entry=false, reinit_globals=reinit_globals@entry=true, allow_include_registry=allow_include_registry@entry=true,
    load_all_shares=load_all_shares@entry=false) at ../../source3/param/loadparm.c:3997
#23 0x00007ffff62e67d5 in lp_load (reinit_globals=true, add_ipc=false, save_defaults=false, global_only=true, pszFname=pszFname@entry=0x7ffff5c85d92 "/var/mmfs/ces/smb.conf")
    at ../../source3/param/loadparm.c:4121
#24 lp_load_global (file_name=file_name@entry=0x7ffff5c85d92 "/var/mmfs/ces/smb.conf") at ../../source3/param/loadparm.c:4149
#25 0x00007ffff62e67ec in lp_load_client (file_name=file_name@entry=0x7ffff5c85d92 "/var/mmfs/ces/smb.conf") at ../../source3/param/loadparm.c:4177
#26 0x0000555555580590 in _samba_cmdline_load_config_s3 () at ../../lib/cmdline/cmdline_s3.c:56
#27 0x00007ffff6975026 in popt_samba_callback (popt_ctx=<optimized out>, reason=POPT_CALLBACK_REASON_POST, opt=0x0, arg=0x0, data=<optimized out>)
    at ../../lib/cmdline/cmdline.c:357
#28 0x00007fffefa59f62 in invokeCallbacksPOST () from /lib64/libpopt.so.0
#29 0x00007fffefa59f26 in invokeCallbacksPOST () from /lib64/libpopt.so.0
#30 0x00007fffefa5b17f in poptGetNextOpt () from /lib64/libpopt.so.0
#31 0x000055555557acdd in main (argc=3, argv=0x7fffffffe568) at ../../source3/utils/net.c:1268

Likely a regression caused by the cmdline context stuff.

Looking...
Comment 1 Samba QA Contact 2021-08-17 11:24:03 UTC
This bug was referenced in samba master:

fd19cae8d2f21977d8285efd3f29e2b480d241e9
4809f4a6ee971bcd9767839c729b636b7582fc02
Comment 2 Ralph Böhme 2021-09-05 13:42:12 UTC
Created attachment 16772 [details]
Patch for 4.13, 4.14 and 4.15 cherry-picked from master
Comment 3 Jeremy Allison 2021-09-06 01:48:22 UTC
Comment on attachment 16772 [details]
Patch for 4.13, 4.14 and 4.15 cherry-picked from master

LGTM !

Off topic, if you could review:

https://gitlab.com/samba-team/samba/-/merge_requests/2147

before we ship 4.15.0 I'd really appreciate it. Submitter has confirmed the fix and without it smbd hangs if we scan a directory containing a UNIX fifo (pathref opens forget to add O_NONBLOCK). I even added a regression test :-).
Comment 4 Jeremy Allison 2021-09-06 01:49:25 UTC
Re-assigning to Jule for inclusion in 4.15.0, 4.14.next, 4.13.next.
Comment 5 Samba QA Contact 2021-09-06 10:17:09 UTC
This bug was referenced in samba v4-13-test:

16fc7a12aca6ecba72d42a86d07739a80cf7a16e
20ef0b16ed365e0dc499bd11231a627af7a0f0e2
Comment 6 Jule Anger 2021-09-06 11:53:09 UTC
Pushed to autobuild-v4-{15,14,13}-test.
Comment 7 Samba QA Contact 2021-09-06 20:18:04 UTC
This bug was referenced in samba v4-15-test:

189bb79ac74f79b3a3de4a3577341de63206f752
16306431a242b87a91d0c4b7ff874e51091d2bd9
Comment 8 Samba QA Contact 2021-09-07 07:13:29 UTC
This bug was referenced in samba v4-13-stable (Release samba-4.13.11):

16fc7a12aca6ecba72d42a86d07739a80cf7a16e
20ef0b16ed365e0dc499bd11231a627af7a0f0e2
Comment 9 Samba QA Contact 2021-09-07 08:43:54 UTC
This bug was referenced in samba v4-15-stable (Release samba-4.15.0rc5):

189bb79ac74f79b3a3de4a3577341de63206f752
16306431a242b87a91d0c4b7ff874e51091d2bd9
Comment 10 Samba QA Contact 2021-09-07 11:13:54 UTC
This bug was referenced in samba v4-14-test:

0e85755f383fc59c981358f98d0fa68a9a0e276d
34c20fe3a169424149179090b4dd72b8e6c8ad9a
Comment 11 Jule Anger 2021-09-07 11:50:51 UTC
Closing out bug report.

Thanks!