public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/proftpd] epel9: Fix file descriptor leak in mod_sftp when reading OpenSSH-format SFTPHostKey
@ 2026-11-10 13:05 Paul Howarth
  0 siblings, 0 replies; only message in thread
From: Paul Howarth @ 2026-11-10 13:05 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/proftpd
            Branch : epel9
            Commit : 00862d3b47ff39158e9fcec86e3610bf1adaa43d
            Author : Paul Howarth <paul@city-fan.org>
            Date   : 2026-10-29T16:27:49+00:00
            Stats  : +30/-4 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/proftpd/c/00862d3b47ff39158e9fcec86e3610bf1adaa43d?branch=epel9

            Log:
            Fix file descriptor leak in mod_sftp when reading OpenSSH-format SFTPHostKey

https://github.com/proftpd/proftpd/issues/1959
https://bugzilla.redhat.com/show_bug.cgi?id=2563077

---
diff --git a/.gitignore b/.gitignore
index 3af5635..5e08dca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,8 @@
-# rawhide/f44/f43/epel10
-/proftpd-1.3.9c.tar.gz
+# rawhide/f45/f44/f43/epel10
+/proftpd-1.3.9e.tar.gz
 /v0.9.12.tar.gz
 /v0.9.7.tar.gz
-/v0.2.tar.gz
+/v0.3.tar.gz
 # epel9
 /proftpd-1.3.8d.tar.gz
 /v0.9.11.tar.gz
@@ -11,3 +11,4 @@
 # epel8
 /proftpd-1.3.6e.tar.gz
 /v0.9.5.tar.gz
+/v0.2.tar.gz

diff --git a/mod_sftp-1.3.8d-issue1959.patch b/mod_sftp-1.3.8d-issue1959.patch
new file mode 100644
index 0000000..f89c137
--- /dev/null
+++ b/mod_sftp-1.3.8d-issue1959.patch
@@ -0,0 +1,15 @@
+--- a/contrib/mod_sftp/keys.c	2026-10-28 13:29:57.021075805 -0400
++++ b/contrib/mod_sftp/keys.c	2026-10-28 13:29:57.023929517 -0400
+@@ -962,7 +962,12 @@
+   }
+ 
+   if (fp != NULL) {
++    /* This also closes the fd. */
+     fclose(fp);
++
++  } else {
++    /* OpenSSH-formatted keys are read directly from the fd. */
++    (void) close(fd);
+   }
+ 
+   /* Restore the normal stderr logging. */

diff --git a/proftpd.spec b/proftpd.spec
index 06d507e..e508eb2 100644
--- a/proftpd.spec
+++ b/proftpd.spec
@@ -38,7 +38,7 @@
 %undefine _strict_symbol_defs_build
 
 #global prever rc4
-%global baserelease 4
+%global baserelease 5
 %global mod_procfs_version 0.2
 %global mod_proxy_version 0.9.4
 %global mod_vroot_version 0.9.11
@@ -78,6 +78,7 @@ Patch25:		https://github.com/proftpd/proftpd/commit/1a5ce646.patch
 Patch26:		https://github.com/user-attachments/files/30205410/mod_sftp-1.3.8d-issue2115.patch
 Patch27:		https://github.com/proftpd/proftpd/commit/baf4b792.patch
 Patch28:		https://github.com/user-attachments/files/30205541/mod_sftp-1.3.8d-issue2190.patch
+Patch29:		mod_sftp-1.3.8d-issue1959.patch
 
 BuildRequires:		coreutils
 BuildRequires:		gcc
@@ -330,6 +331,11 @@ sed -i -e '/^[[:space:]]*TLSCipherSuite[[:space:]]*PROFILE=SYSTEM$/d' mod_tls.co
 # https://github.com/proftpd/proftpd/issues/2190 (CVE-2026-63090)
 %patch -P 28 -p1
 
+# mod_sftp leaks file descriptor when reading SFTPHostKey file
+# https://github.com/proftpd/proftpd/issues/1959
+# https://bugzilla.redhat.com/show_bug.cgi?id=2563077
+%patch -P 29 -p1
+
 # Tweak logrotate script for systemd compatibility (#802178)
 %if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 23)
 sed -i -e '/killall/s/test.*/systemctl reload proftpd.service/' \
@@ -577,6 +583,10 @@ fi
 %{_mandir}/man1/ftpwho.1*
 
 %changelog
+* Thu Oct 29 2026 Paul Howarth <paul@city-fan.org> - 1.3.8d-5
+- Fix file descriptor leak in mod_sftp when reading OpenSSH-format SFTPHostKey
+  file (rhbz#2563077, https://github.com/proftpd/proftpd/issues/1959)
+
 * Wed Jul 22 2026 Paul Howarth <paul@city-fan.org> - 1.3.8d-4
 - Address another avenue for SQL injection, via custom SQLUserInfo queries
   (https://github.com/proftpd/proftpd/issues/2052#issuecomment-4489110598)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-10 13:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 13:05 [rpms/proftpd] epel9: Fix file descriptor leak in mod_sftp when reading OpenSSH-format SFTPHostKey Paul Howarth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox