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 some issues in mod_copy (not enabled by default)
Date: Wed, 11 Nov 2026 17:47:45 GMT [thread overview]
Message-ID: <179441926532.1.11022278551183639596.rpms-proftpd-a07b83b6d9bb@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/proftpd
Branch : epel8
Commit : a07b83b6d9bb32aa8791bd9e8cb8ca602e9506dc
Author : Paul Howarth <paul@city-fan.org>
Date : 2026-11-11T14:52:54+00:00
Stats : +189/-4 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/proftpd/c/a07b83b6d9bb32aa8791bd9e8cb8ca602e9506dc?branch=epel8
Log:
Fix some issues in mod_copy (not enabled by default)
- <Limit READ> configurations were not honored by SITE COPY as they should be
(GH#2095)
- Fix write restriction bypass via symlink following in mod_copy (GH#2374,
CVE-2026-119364)
---
diff --git a/.gitignore b/.gitignore
index de347a8..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
diff --git a/proftpd-1.3.6e-gh2095.patch b/proftpd-1.3.6e-gh2095.patch
new file mode 100644
index 0000000..82a8149
--- /dev/null
+++ b/proftpd-1.3.6e-gh2095.patch
@@ -0,0 +1,41 @@
+--- a/contrib/mod_copy.c
++++ b/contrib/mod_copy.c
+@@ -558,7 +558,7 @@ MODRET copy_copy(cmd_rec *cmd) {
+ return PR_DECLINED(cmd);
+ }
+
+- if (strncasecmp(cmd->argv[1], "COPY", 5) == 0) {
++ if (strcasecmp(cmd->argv[1], "COPY") == 0) {
+ char *cmd_name, *decoded_path, *from, *to;
+ unsigned char *authenticated;
+
+@@ -614,10 +614,29 @@ MODRET copy_copy(cmd_rec *cmd) {
+
+ cmd_name = cmd->argv[0];
+ pr_cmd_set_name(cmd, "SITE_COPY");
++ if (!dir_check(cmd->tmp_pool, cmd, G_READ, from, NULL)) {
++ int xerrno = EPERM;
++
++ pr_cmd_set_name(cmd, cmd_name);
++ pr_log_debug(DEBUG8, "%s %s denied by <Limit> configuration",
++ (char *) cmd->argv[0], from);
++ pr_response_add_err(R_550, "%s: %s", (char *) cmd->argv[2],
++ strerror(xerrno));
++
++ pr_cmd_set_errno(cmd, xerrno);
++ errno = xerrno;
++ return PR_ERROR(cmd);
++ }
++ pr_cmd_set_name(cmd, cmd_name);
++
++ cmd_name = cmd->argv[0];
++ pr_cmd_set_name(cmd, "SITE_COPY");
+ if (!dir_check(cmd->tmp_pool, cmd, G_WRITE, to, NULL)) {
+ int xerrno = EPERM;
+
+ pr_cmd_set_name(cmd, cmd_name);
++ pr_log_debug(DEBUG8, "%s %s denied by <Limit> configuration",
++ (char *) cmd->argv[0], to);
+ pr_response_add_err(R_550, "%s: %s", (char *) cmd->argv[3],
+ strerror(xerrno));
+
diff --git a/proftpd-1.3.6e-gh2374.patch b/proftpd-1.3.6e-gh2374.patch
new file mode 100644
index 0000000..e4706f9
--- /dev/null
+++ b/proftpd-1.3.6e-gh2374.patch
@@ -0,0 +1,127 @@
+--- a/contrib/mod_copy.c
++++ b/contrib/mod_copy.c
+@@ -610,7 +610,12 @@ MODRET copy_copy(cmd_rec *cmd) {
+ return PR_ERROR(cmd);
+ }
+
+- to = dir_canonical_vpath(cmd->tmp_pool, decoded_path);
++ pr_fs_clear_cache2(decoded_path);
++ to = dir_realpath(cmd->tmp_pool, decoded_path);
++ if (to == NULL) {
++ /* Try using dir_best_path(), as xfer_pre_stor() does. */
++ to = dir_best_path(cmd->tmp_pool, decoded_path);
++ }
+
+ cmd_name = cmd->argv[0];
+ pr_cmd_set_name(cmd, "SITE_COPY");
+@@ -618,8 +623,8 @@ MODRET copy_copy(cmd_rec *cmd) {
+ int xerrno = EPERM;
+
+ pr_cmd_set_name(cmd, cmd_name);
+- pr_log_debug(DEBUG8, "%s %s denied by <Limit> configuration",
+- (char *) cmd->argv[0], from);
++ pr_log_debug(DEBUG8, "%s %s %s denied by <Limit> configuration",
++ (char *) cmd->argv[0], (char *) cmd->argv[1], from);
+ pr_response_add_err(R_550, "%s: %s", (char *) cmd->argv[2],
+ strerror(xerrno));
+
+@@ -635,8 +640,8 @@ MODRET copy_copy(cmd_rec *cmd) {
+ int xerrno = EPERM;
+
+ pr_cmd_set_name(cmd, cmd_name);
+- pr_log_debug(DEBUG8, "%s %s denied by <Limit> configuration",
+- (char *) cmd->argv[0], to);
++ pr_log_debug(DEBUG8, "%s %s %s denied by <Limit> configuration",
++ (char *) cmd->argv[0], (char *) cmd->argv[1], to);
+ pr_response_add_err(R_550, "%s: %s", (char *) cmd->argv[3],
+ strerror(xerrno));
+
+@@ -684,7 +689,7 @@ MODRET copy_cpfr(cmd_rec *cmd) {
+ }
+
+ if (cmd->argc < 3 ||
+- strncasecmp(cmd->argv[1], "CPFR", 5) != 0) {
++ strcasecmp(cmd->argv[1], "CPFR") != 0) {
+ return PR_DECLINED(cmd);
+ }
+
+@@ -730,8 +735,9 @@ MODRET copy_cpfr(cmd_rec *cmd) {
+ int xerrno = EPERM;
+
+ pr_cmd_set_name(cmd, cmd_name);
+- pr_response_add_err(R_550, "%s: %s", (char *) cmd->argv[3],
+- strerror(xerrno));
++ pr_log_debug(DEBUG8, "%s %s %s denied by <Limit> configuration",
++ (char *) cmd->argv[0], (char *) cmd->argv[1], path);
++ pr_response_add_err(R_550, "%s: %s", path, strerror(xerrno));
+
+ pr_cmd_set_errno(cmd, xerrno);
+ errno = xerrno;
+@@ -791,7 +797,7 @@ MODRET copy_cpfr(cmd_rec *cmd) {
+
+ MODRET copy_cpto(cmd_rec *cmd) {
+ register unsigned int i;
+- const char *from, *to = "";
++ const char *from, *to = "", *resolved_to;
+ char *cmd_name;
+ unsigned char *authenticated = NULL;
+
+@@ -800,7 +806,7 @@ MODRET copy_cpto(cmd_rec *cmd) {
+ }
+
+ if (cmd->argc < 3 ||
+- strncasecmp(cmd->argv[1], "CPTO", 5) != 0) {
++ strcasecmp(cmd->argv[1], "CPTO") != 0) {
+ return PR_DECLINED(cmd);
+ }
+
+@@ -849,14 +855,21 @@ MODRET copy_cpto(cmd_rec *cmd) {
+ to = pstrcat(cmd->tmp_pool, to, *to ? " " : "", decoded_path, NULL);
+ }
+
+- to = dir_canonical_vpath(cmd->tmp_pool, to);
++ pr_fs_clear_cache2(to);
++ resolved_to = dir_realpath(cmd->tmp_pool, to);
++ if (resolved_to == NULL) {
++ /* Try using dir_best_path(), as xfer_pre_stor() does. */
++ resolved_to = dir_best_path(cmd->tmp_pool, to);
++ }
+
+ cmd_name = cmd->argv[0];
+ pr_cmd_set_name(cmd, "SITE_CPTO");
+- if (!dir_check(cmd->tmp_pool, cmd, G_WRITE, to, NULL)) {
++ if (!dir_check(cmd->tmp_pool, cmd, G_WRITE, resolved_to, NULL)) {
+ int xerrno = EPERM;
+
+ pr_cmd_set_name(cmd, cmd_name);
++ pr_log_debug(DEBUG8, "%s %s %s denied by <Limit> configuration",
++ (char *) cmd->argv[0], (char *) cmd->argv[1], to);
+ pr_response_add_err(R_550, "%s: %s", to, strerror(xerrno));
+
+ pr_cmd_set_errno(cmd, xerrno);
+@@ -865,12 +878,12 @@ MODRET copy_cpto(cmd_rec *cmd) {
+ }
+ pr_cmd_set_name(cmd, cmd_name);
+
+- if (copy_paths(cmd->tmp_pool, from, to) < 0) {
++ if (copy_paths(cmd->tmp_pool, from, resolved_to) < 0) {
+ int xerrno = errno;
+ const char *err_code = R_550;
+
+ pr_log_debug(DEBUG7, MOD_COPY_VERSION
+- ": error copying '%s' to '%s': %s", from, to, strerror(xerrno));
++ ": error copying '%s' to '%s': %s", from, resolved_to, strerror(xerrno));
+
+ /* Check errno for EDQOUT (or the most appropriate alternative).
+ * (I hate the fact that FTP has a special response code just for
+@@ -895,8 +908,8 @@ MODRET copy_cpto(cmd_rec *cmd) {
+ break;
+ }
+
+- pr_response_add_err(err_code, "%s: %s", (char *) cmd->argv[1],
+- strerror(xerrno));
++ pr_response_add_err(err_code, "%s %s: %s", (char *) cmd->argv[0],
++ (char *) cmd->argv[1], strerror(xerrno));
+
+ pr_cmd_set_errno(cmd, xerrno);
+ errno = xerrno;
diff --git a/proftpd.spec b/proftpd.spec
index 1f9d960..2f7f15e 100644
--- a/proftpd.spec
+++ b/proftpd.spec
@@ -66,7 +66,7 @@
%undefine _strict_symbol_defs_build
#global prever rc3
-%global baserelease 11
+%global baserelease 12
%global mod_procfs_version 0.2
%global mod_vroot_version 0.9.5
@@ -112,6 +112,8 @@ 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
Patch124: https://github.com/user-attachments/files/30205541/mod_sftp-1.3.8d-issue2190.patch
+Patch125: proftpd-1.3.6e-gh2095.patch
+Patch126: proftpd-1.3.6e-gh2374.patch
BuildRequires: coreutils
BuildRequires: gcc
@@ -406,6 +408,14 @@ sed -i -e '/^[[:space:]]*TLSCipherSuite[[:space:]]*PROFILE=SYSTEM$/d' mod_tls.co
# https://github.com/proftpd/proftpd/issues/2190 (CVE-2026-63090)
%patch -P 124 -p1
+# <Limit READ> configurations were not honored by SITE COPY as they should be
+# https://github.com/proftpd/proftpd/issues/2095
+%patch -P 125 -p1 -b .gh2095
+
+# Fix write restriction bypass via symlink following in mod_copy (CVE-2026-119364)
+# https://github.com/proftpd/proftpd/issues/2374
+%patch -P 126 -p1 -b .gh2374
+
%if %{use_systemd}
# Tweak logrotate script for systemd compatibility (#802178)
sed -i -e '/killall/s/test.*/systemctl reload proftpd.service/' \
@@ -689,6 +699,13 @@ fi
%{_mandir}/man1/ftpwho.1*
%changelog
+* Wed Nov 11 2026 Paul Howarth <paul@city-fan.org> - 1.3.6e-12
+- Fix some issues in mod_copy (not enabled by default)
+ - <Limit READ> configurations were not honored by SITE COPY as they should be
+ (GH#2095)
+ - Fix write restriction bypass via symlink following in mod_copy (GH#2374,
+ CVE-2026-119364)
+
* Mon Jul 27 2026 Paul Howarth <paul@city-fan.org> - 1.3.6e-11
- Address another avenue for SQL injection, via custom SQLUserInfo queries
(https://github.com/proftpd/proftpd/issues/2052#issuecomment-4489110598)
reply other threads:[~2026-11-11 17:47 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=179441926532.1.11022278551183639596.rpms-proftpd-a07b83b6d9bb@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