[Pkg-samba-maint] Bug#1129976: samba: Samba and testparm crashes with bad talloc magic value - access after free with smb ports in config

Dr. Thomas Orgis thomas.orgis at uni-hamburg.de
Fri Mar 6 22:30:30 GMT 2026


Package: samba
Version: 2:4.22.6+dfsg-0+deb13u1
Severity: normal

Dear Maintainer,

trying to configure samba to use a different port using the old-style syntax

smb ports = tcp:1445

leads to instant crash on samba server and testparm:

$ testparm  /dev/shm/smb-crash.conf 
Load smb config files from /dev/shm/smb-crash.conf
Error loading services.
talloc: access after free error - first free may be at lib/param/loadparm.c:1378
Bad talloc magic value - access after free
===============================================================
INTERNAL ERROR: Bad talloc magic value - access after free in testparm () () pid 3990067 (4.22.6-Debian-4.22.6+dfsg-0+deb13u1)
If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting
===============================================================
PANIC (pid 3990067): Bad talloc magic value - access after free in 4.22.6-Debian-4.22.6+dfsg-0+deb13u1
BACKTRACE: 8 stack frames:
 #0 /usr/lib/x86_64-linux-gnu/samba/libgenrand-private-samba.so.0(log_stack_trace+0x2d) [0x7f737aa435bd]
 #1 /usr/lib/x86_64-linux-gnu/samba/libgenrand-private-samba.so.0(smb_panic+0xd) [0x7f737aa4385d]
 #2 /lib/x86_64-linux-gnu/libtalloc.so.2(+0x3467) [0x7f737b08e467]
 #3 /lib/x86_64-linux-gnu/libsmbconf.so.0(+0x43fc0) [0x7f737b0dbfc0]
 #4 testparm(main+0x6c9) [0x5641631cafd9]
 #5 /lib/x86_64-linux-gnu/libc.so.6(+0x29ca8) [0x7f737adb8ca8]
 #6 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7f737adb8d65]
 #7 testparm(_start+0x21) [0x5641631cc8d1]
Can not dump core: corepath not set up

On trixie, it is possible to use the new-style syntax

server smb transports = tcp:1445

which seems to work (did not test actual operation). But on bookworm, that is not supported
and one simply cannot start a samba instance on a different port.

-- Package-specific info:
* Custom smb.conf:

[global]
security = user
map to guest = Bad Password
server role = standalone server
#server smb transports = tcp:1445
smb ports = tcp:1445


-- System Information:
Debian Release: 13.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.6.101-rrz9 (SMP w/32 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages samba depends on:
ii  init-system-helpers   1.69~deb13u1
ii  libbsd0               0.12.2-2
ii  libc6                 2.41-12+deb13u1
ii  libcups2t64           2.4.10-3+deb13u2
ii  libdbus-1-3           1.16.2-2
ii  libgnutls30t64        3.8.9-3+deb13u2
ii  libldap2              2.6.10+dfsg-1
ii  libldb2               2:2.11.0+samba4.22.6+dfsg-0+deb13u1
ii  libpopt0              1.19+dfsg-2
ii  libtalloc2            2:2.4.3+samba4.22.6+dfsg-0+deb13u1
ii  libtasn1-6            4.20.0-2
ii  libtdb1               2:1.4.13+samba4.22.6+dfsg-0+deb13u1
ii  libtevent0t64         2:0.16.2+samba4.22.6+dfsg-0+deb13u1
ii  libtirpc3t64          1.3.6+ds-1
ii  liburing2             2.9-1
ii  passwd                1:4.17.4-2
ii  procps                2:4.0.4-9
ii  samba-common          2:4.22.6+dfsg-0+deb13u1
ii  samba-common-bin      2:4.22.6+dfsg-0+deb13u1
ii  samba-libs [libndr6]  2:4.22.6+dfsg-0+deb13u1

Versions of packages samba recommends:
ii  attr           1:2.5.2-3
ii  python3-samba  2:4.22.6+dfsg-0+deb13u1
ii  samba-ad-dc    2:4.22.6+dfsg-0+deb13u1

Versions of packages samba suggests:
pn  ctdb                 <none>
pn  samba-vfs-ceph       <none>
pn  samba-vfs-glusterfs  <none>
pn  ufw                  <none>
ii  winbind              2:4.22.6+dfsg-0+deb13u1

-- no debconf information


-- 
Dr. Thomas Orgis
HPC @ Universität Hamburg



More information about the Pkg-samba-maint mailing list