Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: gluste...@packages.debian.org
Control: affects -1 + src:glusterfs

Please unblock package glusterfs

It fixes an annoying bug #1077626 in glusterfs which causes segfaults.
This is also fixed in Ubuntu since a longer time and fixed by upstream.

Upstream bug: https://github.com/gluster/glusterfs/issues/4295
Ubuntu bug: https://launchpad.net/bugs/2064843

[ Checklist ]
  [x ] all changes are documented in the d/changelog
  [x ] I reviewed all changes and I approve them
  [x ] attach debdiff against the package in testing

unblock glusterfs/11.1-6
diff -Nru glusterfs-11.1/debian/changelog glusterfs-11.1/debian/changelog
--- glusterfs-11.1/debian/changelog     2024-07-08 14:27:41.000000000 +0200
+++ glusterfs-11.1/debian/changelog     2025-07-11 10:26:54.000000000 +0200
@@ -1,3 +1,11 @@
+glusterfs (11.1-6) unstable; urgency=medium
+
+  * Add patch 09-fix-stack-overflow-in-inode-destroy from Andreas Hasenack to
+    fix a segfault under certain conditions.
+    Closes: #1077626
+
+ -- Patrick Matthäi <pmatth...@debian.org>  Fri, 11 Jul 2025 10:26:54 +0200
+
 glusterfs (11.1-5) unstable; urgency=medium
 
   * Bump Standards-Version to 4.7.0.
diff -Nru 
glusterfs-11.1/debian/patches/09-fix-stack-overflow-in-inode-destroy.diff 
glusterfs-11.1/debian/patches/09-fix-stack-overflow-in-inode-destroy.diff
--- glusterfs-11.1/debian/patches/09-fix-stack-overflow-in-inode-destroy.diff   
1970-01-01 01:00:00.000000000 +0100
+++ glusterfs-11.1/debian/patches/09-fix-stack-overflow-in-inode-destroy.diff   
2025-07-11 10:26:54.000000000 +0200
@@ -0,0 +1,45 @@
+Description: Fix stack overflow in __inode_destroy
+ A recursive call to inode_unref was introduced when support for inode-level
+ namespaces was added. This results in a stack overflow under certain
+ conditions leading to brick SEGFAULTs. This patch removes the recurisve call
+ to inode_unref. This was fixed upstream but is yet to be included in a
+ release.
+ .
+ glusterfs (11.1-4ubuntu1) noble; urgency=medium
+ .
+   * Fix stack overflow in __inode_destroy (LP: #2064843)
+Origin: upstream, 
https://github.com/gluster/glusterfs/commit/da2391dacd3483555e91a33ecdf89948be62b691
+Bug: https://github.com/gluster/glusterfs/issues/4295
+Bug-Ubuntu: https://launchpad.net/bugs/2064843
+Author: Mohit Agrawal <moagr...@redhat.com>
+Reviewed-By: Xavi Hernandez <xhernan...@gmail.com>
+Reviewed-By: Amar Tumballi <a...@dhiway.com>
+Reviewed-By: Bryce Harrington <bryce.harring...@canonical.com>
+Last-Update: 2024-05-08
+
+---
+
+--- glusterfs-11.1.orig/libglusterfs/src/inode.c
++++ glusterfs-11.1/libglusterfs/src/inode.c
+@@ -351,9 +351,19 @@ __inode_ctx_free(inode_t *inode)
+ static void
+ __inode_destroy(inode_t *inode)
+ {
+-    inode_unref(inode->ns_inode);
+-    __inode_ctx_free(inode);
++    inode_table_t *table = NULL;
++    inode_t *ns_inode = inode->ns_inode;
++
++    if (ns_inode) {
++        table = ns_inode->table;
++        pthread_mutex_lock(&table->lock);
++        {
++            __inode_unref(ns_inode, false);
++        }
++        pthread_mutex_unlock(&table->lock);
++    }
+ 
++    __inode_ctx_free(inode);
+     LOCK_DESTROY(&inode->lock);
+     //  memset (inode, 0xb, sizeof (*inode));
+     GF_FREE(inode);
diff -Nru glusterfs-11.1/debian/patches/series 
glusterfs-11.1/debian/patches/series
--- glusterfs-11.1/debian/patches/series        2023-12-12 12:00:59.000000000 
+0100
+++ glusterfs-11.1/debian/patches/series        2025-07-11 10:26:54.000000000 
+0200
@@ -5,3 +5,4 @@
 05-remove-hashbang.diff
 06-hardcode-ssl-path.diff
 08-bash-term-in-posix-shell.diff
+09-fix-stack-overflow-in-inode-destroy.diff

Reply via email to