Date: Tue, 12 May 2026 01:54:37 +0000 From: Xavier Beaudouin <kiwi@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Cc: Dimitry Andric <dim@FreeBSD.org> Subject: git: 7636db11242e - main - net/samba423: Fix SIGABRT in bsd_attr_list() Message-ID: <6a02885d.259e2.70206a0f@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by kiwi: URL: https://cgit.FreeBSD.org/ports/commit/?id=7636db11242efd9a7a2ec82054fd32fa265db697 commit 7636db11242efd9a7a2ec82054fd32fa265db697 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2026-05-11 08:43:08 +0000 Commit: Xavier Beaudouin <kiwi@FreeBSD.org> CommitDate: 2026-05-12 01:54:04 +0000 net/samba423: Fix SIGABRT in bsd_attr_list() After FORTIFY_SOURCE was added for https://bugzilla.samba.org/show_bug.cgi?id=16040, which landed in Samba 4.23.7, the net/samba423 port started crashing quite soon after startup. It turns out that bsd_attr_list() does a number of overlapping strncpy() calls, and this is undefined behavior. PR: 295130 Approved by: samba (kiwi) Sponsored by: Klara, Inc. --- net/samba423/files/patch-lib_replace_xattr.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/net/samba423/files/patch-lib_replace_xattr.c b/net/samba423/files/patch-lib_replace_xattr.c new file mode 100644 index 000000000000..8e11ab29cf39 --- /dev/null +++ b/net/samba423/files/patch-lib_replace_xattr.c @@ -0,0 +1,14 @@ +--- lib/replace/xattr.c.orig 2026-01-23 10:53:40 UTC ++++ lib/replace/xattr.c +@@ -279,9 +279,9 @@ static ssize_t bsd_attr_list (int type, extattr_arg ar + errno = ERANGE; + return -1; + } +- strncpy(list, extattr[t].name, extattr[t].len + 1); ++ memmove(list, extattr[t].name, extattr[t].len + 1); + list += extattr[t].len; +- strncpy(list, buf + i + 1, len); ++ memmove(list, buf + i + 1, len); + list[len] = '\0'; + list += len + 1; + }home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a02885d.259e2.70206a0f>
