Skip to contentSkip to conversation

samba: upgrade to 4.22.10

PATCH In review Himanshu Jadon -X (hjadon - E INFOCHIPS PRIVATE LIMITED at Cisco) 1 participant 1 message Jun 19

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 samba: upgrade to 4.22.10

From: Himanshu Jadon <[email protected]>

Upgrade Samba to the fixed 4.22.10 security release for Scarthgap.

Samba 4.22.10 addresses the following security CVEs:
CVE-2026-1933, CVE-2026-2340, CVE-2026-3012, CVE-2026-3238, CVE-2026-4408, and CVE-2026-4480.

Release notes:
https://www.samba.org/samba/history/samba-4.22.10.html

The base 4.19.9 version is directly affected by CVE-2026-3012, CVE-2026-3238, CVE-2026-4408, and CVE-2026-4480. Samba lists CVE-2026-1933 as affecting versions since 4.21 and CVE-2026-2340 as affecting versions since 4.20, so those two are fixed by 4.22.10 but are not applicable to the base 4.19.9 version.

The upgrade requires newer talloc, tdb, and tevent from the preceding commits. Drop the system libldb dependency and pyldb runtime dependency because newer Samba builds its own LDB/PyLDB copy, matching the upstream meta-openembedded upgrade path.

Refresh the existing recipe patches for the 4.22.10 source layout. Add bison-native for the generated parser build and add docbook-xml-dtd4-native so Samba manpage generation can resolve the native DocBook XML catalog directly.

Raise the xsltproc maxdepth used for Samba manpage generation. The generated smb.conf.5 DocBook input is large enough to hit libxslt's default recursion limit with the DocBook stylesheet.

Package samba-bgqd.service with samba-base because Samba 4.22.10 installs the unit when systemd support is enabled.

---
 .../samba/0001-Don-t-check-xsltproc-manpages.patch | 20 ++--------
 .../0003-Add-config-option-without-valgrind.patch  |  9 ++---
 ...dd-options-to-configure-the-use-of-libbsd.patch | 45 +++++++++++++++-------
 ...raise-xsltproc-maxdepth-for-manpage-build.patch | 36 +++++++++++++++++
 .../samba/{samba_4.19.9.bb => samba_4.22.10.bb}    | 45 ++++++++++++++++++----
 5 files changed, 113 insertions(+), 42 deletions(-)
 create mode 100644 meta-networking/recipes-connectivity/samba/samba/0008-build-raise-xsltproc-maxdepth-for-manpage-build.patch
 rename meta-networking/recipes-connectivity/samba/{samba_4.19.9.bb => samba_4.22.10.bb} (87%)
meta-networking/recipes-connectivity/samba/samba/0001-Don-t-check-xsltproc-manpages.patch +4 -16
index a498348c20..dea0bab99e 100644
@@ -9,25 +9,14 @@ Signed-off-by: Bian Naimeng <[email protected]>
 
 Rebase to 4.14.4
 Signed-off-by: Yi Zhao <[email protected]>
+
+Rebase to 4.23.5
+Signed-off-by: Gyorgy Sarvari <[email protected]>
 ---
- lib/ldb/wscript    | 2 +-
  lib/talloc/wscript | 2 +-
  lib/tdb/wscript    | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
+ 2 files changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/lib/ldb/wscript b/lib/ldb/wscript
-index ed5d45f..de3c648 100644
---- a/lib/ldb/wscript
-+++ b/lib/ldb/wscript
-@@ -144,7 +144,7 @@ def configure(conf):
-         conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_RELEASE', int(v[2]))
- 
-     if conf.env.standalone_ldb:
--        conf.CHECK_XSLTPROC_MANPAGES()
-+        #conf.CHECK_XSLTPROC_MANPAGES()
- 
-         # we need this for the ldap backend
-         if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
 diff --git a/lib/talloc/wscript b/lib/talloc/wscript
 index 075f1ec..9bd9f73 100644
 --- a/lib/talloc/wscript
@@ -56,4 +45,3 @@ index 5e6a928..f13cf2a 100644
      conf.SAMBA_CHECK_PYTHON_HEADERS()
 -- 
 2.25.1
-
meta-networking/recipes-connectivity/samba/samba/0003-Add-config-option-without-valgrind.patch +3 -6
index 2c9d29c9fe..aa25966d31 100644
@@ -37,7 +37,7 @@ diff --git a/wscript b/wscript
 index 95ddd9e..6d9577a 100644
 --- a/wscript
 +++ b/wscript
-@@ -123,6 +123,13 @@ def options(opt):
+@@ -131,6 +131,13 @@
                    help=('Disable kernely keyring support for credential storage'),
                    action='store_false', dest='enable_keyring')
  
@@ -48,9 +48,6 @@ index 95ddd9e..6d9577a 100644
 +                   help=("Disable use of valgrind"),
 +                   action="store_false", dest='enable_valgrind', default=False)
 +
-     gr = opt.option_group('developer options')
+     opt.samba_add_onoff_option('ldap')
  
-     opt.load('python') # options for disabling pyc or pyo compilation
--- 
-2.25.1
-
+     opt.option_group('developer options')
meta-networking/recipes-connectivity/samba/samba/0004-Add-options-to-configure-the-use-of-libbsd.patch +32 -13

78 lines not on this page · raw message

meta-networking/recipes-connectivity/samba/samba/0008-build-raise-xsltproc-maxdepth-for-manpage-build.patch new file +36 -0
new file mode 100644
index 0000000000..d2ba9e0e67
@@ -0,0 +1,36 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Himanshu Jadon <[email protected]>
+Date: Thu, 11 Jun 2026 06:00:00 -0700
+Subject: [PATCH] build: raise xsltproc maxdepth for manpage build
+
+The generated smb.conf.5 DocBook input in Samba 4.22.10 is large enough
+to hit libxslt's default recursion limit while the DocBook manpage
+stylesheet runs string.subst. Raise the xsltproc maxdepth for the final
+Samba manpage transform to avoid failing with:
+
+  xsltApplySequenceConstructor: A potential infinite template recursion
+  was detected.
+
+This changes only the documentation generation command and does not
+alter the generated Samba binaries.
+
+Upstream-Status: Pending
+
+Signed-off-by: Himanshu Jadon <[email protected]>
+---
+ buildtools/wafsamba/wafsamba.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
+index 8edcc74..5f9b4ac 100644
+--- a/buildtools/wafsamba/wafsamba.py
++++ b/buildtools/wafsamba/wafsamba.py
+@@ -1217,7 +1217,7 @@ def SAMBAMANPAGES(bld, manpages, extra_source=None):
+                             rule='''XML_CATALOG_FILES="${SAMBA_CATALOGS}"
+                                     export XML_CATALOG_FILES
+                                     ${XSLTPROC} --xinclude --stringparam noreference 0 -o ${TGT}.xml --nonet ${SAMBA_EXPAND_XSL} ${SRC[0].abspath(env)}
+-                                    ${XSLTPROC} --nonet -o ${TGT} ${SAMBA_MAN_XSL} ${TGT}.xml'''
++                                    ${XSLTPROC} --maxdepth 10000 --nonet -o ${TGT} ${SAMBA_MAN_XSL} ${TGT}.xml'''
+                             )
+         bld.INSTALL_FILES('${MANDIR}/man%s' % m[-1], m, flat=True)
+ Build.BuildContext.SAMBAMANPAGES = SAMBAMANPAGES
meta-networking/recipes-connectivity/samba/samba_4.22.10.bb renamed from meta-networking/recipes-connectivity/samba/samba_4.19.9.bb +38 -7

99 lines not on this page · raw message