public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/incron] epel9: Disallow users passing their own config. Fixes rhbz#2568586
@ 2026-11-12  1:52 Kevin Fenzi
  0 siblings, 0 replies; only message in thread
From: Kevin Fenzi @ 2026-11-12  1:52 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/incron
            Branch : epel9
            Commit : 0f4d3ebc61fe8841f2114e344293607b0eceedf9
            Author : Kevin Fenzi <kevin@scrye.com>
            Date   : 2026-11-11T09:15:08-08:00
            Stats  : +20/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/incron/c/0f4d3ebc61fe8841f2114e344293607b0eceedf9?branch=epel9

            Log:
            Disallow users passing their own config. Fixes rhbz#2568586

When users were passing their own config there was a check
that would emit a warning that the config would be ignored and
the default one would be used, but that part never worked
and it just used the user provided config.

This just errors out when a user passes their own config file.

This is a security problem as it would allow local users
to escalate their privs.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>

---
diff --git a/incron-0.5.12-nonroot-config.patch b/incron-0.5.12-nonroot-config.patch
new file mode 100644
index 0000000..72e2ccb
--- /dev/null
+++ b/incron-0.5.12-nonroot-config.patch
@@ -0,0 +1,13 @@
+diff --color -Nur incron-0.5.12.orig/ict-main.cpp incron-0.5.12/ict-main.cpp
+--- incron-0.5.12.orig/ict-main.cpp	2015-02-09 01:03:19.000000000 -0800
++++ incron-0.5.12/ict-main.cpp	2026-11-10 14:25:35.257418702 -0800
+@@ -502,7 +502,8 @@
+     std::string cfg(INCRON_CONFIG);
+     if (AppArgs::GetOption("config", cfg)) {
+       if (uid != 0) {
+-        fprintf(stderr, "insufficient privileges to use custom configuration (will use default)\n");
++        fprintf(stderr, "insufficient privileges to use custom configuration.\n");
++        return 1;
+       }
+       else if (euidaccess(cfg.c_str(), R_OK) != 0) {
+         perror("cannot read configuration file (will use default)");

diff --git a/incron.spec b/incron.spec
index 7cf62b6..a106b97 100644
--- a/incron.spec
+++ b/incron.spec
@@ -1,7 +1,7 @@
 Summary:     Inotify cron system
 Name:        incron
 Version:     0.5.12
-Release:     30%{?dist}
+Release:     31%{?dist}
 
 # Automatically converted from old format: GPLv2 - review is highly recommended.
 License:     GPL-2.0-only
@@ -12,6 +12,8 @@ Patch0:      incron-0.5.10-gcc.patch
 Patch1:      incron-0.5.12-prevent-zombies.patch
 # https://github.com/ar-/incron/pull/56
 Patch2:      56.patch
+# Non root users should not be allowed to pass their own config
+Patch3:      incron-0.5.12-nonroot-config.patch
 
 BuildRequires: systemd
 BuildRequires: gcc-c++
@@ -33,6 +35,7 @@ filesystem events rather than time periods.
 %patch -P0 -p1 -b .gcc
 %patch -P1 -p1
 %patch -P2 -p1
+%patch -P3 -p1
 
 %build
 make %{?_smp_mflags} CXXFLAGS="%{optflags} -std=c++14" LDFLAGS="%{__global_ldflags}"
@@ -73,6 +76,9 @@ make install-man MANPATH="%{buildroot}%{_mandir}" INSTALL="install -D -p"
 %dir %{_sysconfdir}/%{name}.d
 
 %changelog
+* Tue Nov 10 2026 Kevin Fenzi <kevin@scrye.com> - 0.5.12-31
+- Add Patch to stop non root users using their own config. Fixes rhbz#2568586
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.12-30
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

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

only message in thread, other threads:[~2026-11-12  1:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12  1:52 [rpms/incron] epel9: Disallow users passing their own config. Fixes rhbz#2568586 Kevin Fenzi

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