public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Paul Howarth <paul@city-fan.org>
To: git-commits@fedoraproject.org
Subject: [rpms/proftpd] epel8: Fix signed integer overflow via scp file size record parser (CVE-2026-63091)
Date: Tue, 28 Jul 2026 18:05:58 GMT	[thread overview]
Message-ID: <178526195835.1.2760695493439130978.rpms-proftpd-d186c914291a@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/proftpd
            Branch : epel8
            Commit : d186c914291a8c74fe0408e7cc03a5bd6a08ae41
            Author : Paul Howarth <paul@city-fan.org>
            Date   : 2026-07-27T16:41:37+01:00
            Stats  : +56/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/proftpd/c/d186c914291a8c74fe0408e7cc03a5bd6a08ae41?branch=epel8

            Log:
            Fix signed integer overflow via scp file size record parser (CVE-2026-63091)

Exercise caution when reading the client-provided file size for SCP uploads,
as it could possibly overflow our size type.

---
diff --git a/baf4b792.patch b/baf4b792.patch
new file mode 100644
index 0000000..5865d81
--- /dev/null
+++ b/baf4b792.patch
@@ -0,0 +1,49 @@
+From baf4b7929758c72cdb6cf16325fa25f435d23db6 Mon Sep 17 00:00:00 2001
+From: TJ Saunders <tj@castaglia.org>
+Date: Wed, 1 Jul 2026 09:14:38 -0700
+Subject: [PATCH] Exercise caution when reading the client-provided file size
+ for SCP uploads, as it could possibly overflow our size type.
+
+Thanks to Fabian Wahle of Hap Security for reporting this issue.
+---
+ contrib/mod_sftp/scp.c | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/contrib/mod_sftp/scp.c b/contrib/mod_sftp/scp.c
+index 8c105587f..b1f3e89ae 100644
+--- a/contrib/mod_sftp/scp.c
++++ b/contrib/mod_sftp/scp.c
+@@ -603,16 +603,27 @@ static int recv_perms(pool *p, uint32_t channel_id, char *mode_str,
+ 
+ static int recv_filesz(pool *p, uint32_t channel_id, char *size_str,
+     off_t *filesz) {
+-  register unsigned int i;
++  char *endp = NULL;
++  unsigned long long sz;
++  *filesz = 0;
+ 
+-  /* The file size field could be of arbitrary length. */
+-  for (i = 0, *filesz = 0; PR_ISDIGIT(size_str[i]); i++) {
+-    pr_signals_handle();
++#if defined(HAVE_STROULL)
++  sz = strtoull(size_str, &endp, 10);
++#else
++  sz = strtoul(size_str, &endp, 10);
++#endif /* HAVE_STROULL */
+ 
+-    *filesz = (*filesz * 10) + (size_str[i] - '0');
++  *filesz = (off_t) sz;
++
++  /* Watch for cases where the sent file size might overflow our size type. */
++  if (*filesz < 0) {
++    pr_trace_msg(trace_channel, 2, "file size out of range");
++    write_confirm(p, channel_id, 1, "file size out of range");
++    return -1;
+   }
+ 
+-  if (size_str[i] != ' ') {
++  if (endp == NULL ||
++      *endp != ' ') {
+     pr_trace_msg(trace_channel, 2, "file size not followed by space delimiter");
+     write_confirm(p, channel_id, 1, "file size not delimited");
+     return -1;

diff --git a/proftpd.spec b/proftpd.spec
index 2d533f6..90c7bf3 100644
--- a/proftpd.spec
+++ b/proftpd.spec
@@ -108,6 +108,7 @@ Patch119:		https://github.com/proftpd/proftpd/commit/07797aba.patch
 Patch120:		https://github.com/proftpd/proftpd/commit/5e06acc4.patch
 Patch121:		https://github.com/proftpd/proftpd/commit/1a5ce646.patch
 Patch122:		https://github.com/user-attachments/files/30205410/mod_sftp-1.3.8d-issue2115.patch
+Patch123:		https://github.com/proftpd/proftpd/commit/baf4b792.patch
 
 BuildRequires:		coreutils
 BuildRequires:		gcc
@@ -391,6 +392,10 @@ sed -i -e '/^[[:space:]]*TLSCipherSuite[[:space:]]*PROFILE=SYSTEM$/d' mod_tls.co
 # https://github.com/proftpd/proftpd/issues/2115
 %patch -P 122 -p1
 
+# Exercise caution when reading the client-provided file size for SCP uploads,
+# as it could possibly overflow our size type (CVE-2026-63091)
+%patch -P 123 -p1
+
 %if %{use_systemd}
 # Tweak logrotate script for systemd compatibility (#802178)
 sed -i -e '/killall/s/test.*/systemctl reload proftpd.service/' \
@@ -678,6 +683,8 @@ fi
   (https://github.com/proftpd/proftpd/issues/2052#issuecomment-4489110598)
 - Fix SFTP request payload length underflow calculation in mod_sftp
   (CVE-2026-53994, https://github.com/proftpd/proftpd/issues/2115)
+- Exercise caution when reading the client-provided file size for SCP uploads,
+  as it could possibly overflow our size type (CVE-2026-63091)
 
 * Mon May 11 2026 Paul Howarth <paul@city-fan.org> - 1.3.6e-10
 - Fix for SQL Injection in mod_wrap2_sql via reverse DNS hostname

                 reply	other threads:[~2026-07-28 18:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178526195835.1.2760695493439130978.rpms-proftpd-d186c914291a@fedoraproject.org \
    --to=paul@city-fan.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox