public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/proftpd] epel8: Fix authorization bypass via mod_sftp copy-file extension (CVE-2026-119147)
@ 2026-11-11 17:47 Paul Howarth
0 siblings, 0 replies; only message in thread
From: Paul Howarth @ 2026-11-11 17:47 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/proftpd
Branch : epel8
Commit : 7023efef38792b41c26b874eec96991c9397cce6
Author : Paul Howarth <paul@city-fan.org>
Date : 2026-11-11T17:40:08+00:00
Stats : +84/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/proftpd/c/7023efef38792b41c26b874eec96991c9397cce6?branch=epel8
Log:
Fix authorization bypass via mod_sftp copy-file extension (CVE-2026-119147)
When an authenticated user invokes the SFTP "copy-file" extension and the
destination does not exist, mod_sftp performs the copy without checking some
policies, allowing for file creation in directories denied by '<Limit WRITE>'.
---
diff --git a/proftpd-1.3.6e-CVE-2026-119147.patch b/proftpd-1.3.6e-CVE-2026-119147.patch
new file mode 100644
index 0000000..1d7e122
--- /dev/null
+++ b/proftpd-1.3.6e-CVE-2026-119147.patch
@@ -0,0 +1,78 @@
+From b7d3de4565ae448a510feecd17b41923e44bfe16 Mon Sep 17 00:00:00 2001
+From: TJ Saunders <tj@castaglia.org>
+Date: Wed, 21 Oct 2026 10:49:06 -0700
+Subject: [PATCH] When an authenticated user invokes the SFTP "copy-file"
+ extension and the destination does not exist, mod_sftp performs the copy
+ without checking some policies, allowing for file creation in directories
+ denied by `<Limit WRITE>`.
+
+Thanks to Abraxas Labs and MiniMax Security for reporting this issue.
+---
+ contrib/mod_sftp/fxp.c | 32 ++++++++++++++++++++++++--------
+ 1 file changed, 24 insertions(+), 8 deletions(-)
+
+diff --git a/contrib/mod_sftp/fxp.c b/contrib/mod_sftp/fxp.c
+index a6a38bfda..4ace40ea0 100644
+--- a/contrib/mod_sftp/fxp.c
++++ b/contrib/mod_sftp/fxp.c
+@@ -4555,29 +4555,22 @@ static int fxp_handle_ext_copy_file(struct fxp_packet *fxp, char *src,
+ res = pr_fsio_stat(dst, &st);
+ if (res == 0) {
+ unsigned char *allow_overwrite = NULL;
+- int limit_allow;
+
+ allow_overwrite = get_param_ptr(get_dir_ctxt(fxp->pool, dst),
+ "AllowOverwrite", FALSE);
+
+ cmd2 = pr_cmd_alloc(fxp->pool, 3, "SITE_COPY", src, dst);
+ cmd2->arg = pstrdup(fxp->pool, args);
+- limit_allow = dir_check(fxp->pool, cmd2, "WRITE", dst, NULL);
+
+ if (!overwrite ||
+ (allow_overwrite == NULL ||
+- *allow_overwrite == FALSE) ||
+- !limit_allow) {
++ *allow_overwrite == FALSE)) {
+ xerrno = EACCES;
+
+ if (!overwrite) {
+ (void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION,
+ "'%s' exists and client did not request COPY overwrites", dst);
+
+- } else if (!limit_allow) {
+- (void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION,
+- "COPY to '%s' blocked by <Limit> configuration", dst);
+-
+ } else {
+ (void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION,
+ "AllowOverwrite permission denied for '%s'", dst);
+@@ -4648,6 +4648,29 @@ static int fxp_handle_ext_copy_file(struct fxp_packet *fxp, char *src,
+ return fxp_packet_write(resp);
+ }
+
++ if (!dir_check(fxp->pool, cmd2, "WRITE", dst, NULL)) {
++ xerrno = EACCES;
++
++ (void) pr_log_writefile(sftp_logfd, MOD_SFTP_VERSION,
++ "COPY to '%s' blocked by <Limit> configuration", dst);
++
++ status_code = fxp_errno2status(xerrno, &reason);
++
++ pr_trace_msg(trace_channel, 8, "sending response: STATUS %lu '%s'",
++ (unsigned long) status_code, reason);
++
++ fxp_status_write(fxp->pool, &buf, &buflen, fxp->request_id, status_code,
++ reason, NULL);
++
++ fxp_cmd_dispatch_err(cmd);
++
++ resp = fxp_packet_create(fxp->pool, fxp->channel_id);
++ resp->payload = ptr;
++ resp->payload_sz = (bufsz - buflen);
++
++ return fxp_packet_write(resp);
++ }
++
+ res = pr_fs_copy_file2(src, dst, 0, NULL);
+ if (res < 0) {
+ xerrno = errno;
diff --git a/proftpd.spec b/proftpd.spec
index ef9c8d3..ef7fdf5 100644
--- a/proftpd.spec
+++ b/proftpd.spec
@@ -115,6 +115,7 @@ Patch124: https://github.com/user-attachments/files/30205541/mod_sftp-1.3.8d-is
Patch125: proftpd-1.3.6e-gh2095.patch
Patch126: proftpd-1.3.6e-gh2374.patch
Patch127: proftpd-1.3.6e-CVE-2026-119146.patch
+Patch128: proftpd-1.3.6e-CVE-2026-119147.patch
BuildRequires: coreutils
BuildRequires: gcc
@@ -422,6 +423,10 @@ sed -i -e '/^[[:space:]]*TLSCipherSuite[[:space:]]*PROFILE=SYSTEM$/d' mod_tls.co
# https://github.com/proftpd/proftpd/commit/502d280b8d0ef72e44c6dd0a35a9405af0a1e301
%patch -P 127 -p1 -b .cve-2026-119146
+# Fix authorization bypass via mod_sftp copy-file extension (CVE-2026-119147)
+# https://github.com/proftpd/proftpd/commit/b7d3de4565ae448a510feecd17b41923e44bfe16
+%patch -P 128 -p1 -b .cve-2026-119147
+
%if %{use_systemd}
# Tweak logrotate script for systemd compatibility (#802178)
sed -i -e '/killall/s/test.*/systemctl reload proftpd.service/' \
@@ -713,6 +718,7 @@ fi
CVE-2026-119364)
- Guard against overly-long keys overflowing buffers when the "utf8trans"
builtin RewriteMap type is used (CVE-2026-119146)
+- Fix authorization bypass via mod_sftp copy-file extension (CVE-2026-119147)
* Mon Jul 27 2026 Paul Howarth <paul@city-fan.org> - 1.3.6e-11
- Address another avenue for SQL injection, via custom SQLUserInfo queries
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-11 17:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 17:47 [rpms/proftpd] epel8: Fix authorization bypass via mod_sftp copy-file extension (CVE-2026-119147) Paul Howarth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox