Public bug reported:
Ubuntu 26.10, samba 2:4.24.7+dfsg-1ubuntu1
smb.conf:
interfaces = lo "enp2s0f0;options=dynamic"
bind interfaces only = yes
The interface has a SLAAC IPv6 address. The router sends a router advertisement
about every 8 s, and each one
makes the kernel send RTM_NEWADDR for the same, unchanged address (ip monitor
address shows it with
valid_lft 300sec every time). smbd opens another listening socket for that
address on every event and never
closes the earlier ones.
After about 17 hours smbd had 8,193 sockets listening on [<v6 addr>]:445
and 16,424 open fds (limit 16,384):
ss -ltn | grep ':445 ' | awk '{print $4}' | sort | uniq -c
1 127.0.0.1:445
1 [::1]:445
2 192.168.0.2:445
8193 [2001:db8:...:1318]:445
Then the parent logged, every few seconds,
smbd_open_one_socket: open_socket_in failed: Too many open files
and for every incoming connection, in a tight loop (9 million lines, 1 GB of
log.smbd in 10 hours),
source3/smbd/server.c:1049(smbd_accept_connection) accept: Too many open
files
No client could connect over IPv4 or IPv6 until smbd was restarted.
Expected: an RTM_NEWADDR for an address that already has a listening socket is
ignored (or the existing
socket is kept), so the socket count stays at one per address.
Upstream master (checked 2026-11-15) still has no such check: on ADDRCHANGE_ADD
for a dynamic interface,
smbd_addr_changed() calls smbd_dynamic_open_socket() ->
smbd_open_socket_for_ip() -> smbd_open_one_socket(),
which opens a socket and appends it to parent->sockets without looking for an
existing socket on that
address. On ADDRCHANGE_DEL, smbd_close_socket_for_ip() closes only the first
matching socket and returns.
Workaround: drop ";options=dynamic" (addresses are then bound only at
start).
I found no existing report in Launchpad or Samba Bugzilla. I have no Samba
Bugzilla account; could the
Ubuntu server team forward this upstream if it is confirmed?
This report was prepared with an AI assistant; I have reviewed it.
ProblemType: Bug
DistroRelease: Ubuntu 26.10
Package: samba 2:4.24.7+dfsg-1ubuntu1
ProcVersionSignature: Ubuntu 7.3.0-10.10-generic 7.3.0
Uname: Linux 7.3.0-10-generic x86_64
ApportVersion: 2.36.0-0ubuntu1
Architecture: amd64
CasperMD5CheckResult: pass
Date: Sun Nov 15 16:24:07 2026
InstallationDate: Installed on 2026-02-14 (275 days ago)
InstallationMedia: Ubuntu-Server 25.10 "Questing Quokka" - Release amd64
(20251007.1)
ProcEnviron:
LANG=en_US.UTF-8
PATH=(custom, user)
SHELL=/bin/bash
TERM=tmux-256color
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: samba
UpgradeStatus: Upgraded to stonking on 2026-11-01 (14 days ago)
** Affects: samba (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug stonking third-party-packages
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2174553
Title:
interfaces “<if>;options=dynamic”: smbd opens a new listening socket
on every IPv6 router advertisement until it runs out of file
descriptors
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/2174553/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs