mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
cups: allow unknown directives in conf files
Patch for CVE-2025-61915 by mistake causes fatal error on unknown directives in configuration files. The default configuration already contains unknown directive in non-systemd setups: Unknown directive IdleExitTimeout on line 32 of /etc/cups/cupsd.conf Backport fix for this from 2.4.x branch which reverts this behavior. (From OE-Core rev: 2f36a12a72cf1f91a2d6ee68bd04292979608eb9) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Paul Barker <paul@pbarker.dev> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
bfe84d74fe
commit
8df07c5662
@@ -19,6 +19,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/cups-${PV}-source.tar.gz \
|
||||
file://CVE-2025-58364.patch \
|
||||
file://CVE-2025-58436.patch \
|
||||
file://CVE-2025-61915.patch \
|
||||
file://0001-conf.c-Fix-stopping-scheduler-on-unknown-directive.patch \
|
||||
"
|
||||
|
||||
GITHUB_BASE_URI = "https://github.com/OpenPrinting/cups/releases"
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From 277d3b1c49895f070bbf4b73cada011d71fbf9f3 Mon Sep 17 00:00:00 2001
|
||||
From: Zdenek Dohnal <zdohnal@redhat.com>
|
||||
Date: Thu, 4 Dec 2025 09:04:37 +0100
|
||||
Subject: [PATCH] conf.c: Fix stopping scheduler on unknown directive
|
||||
|
||||
Change the return value to do not trigger stopping the scheduler in case
|
||||
of unknown directive, because stopping the scheduler on config errors
|
||||
should only happen in case of syntax errors.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/OpenPrinting/cups/commit/277d3b1c49895f070bbf4b73cada011d71fbf9f3]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
scheduler/conf.c | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/scheduler/conf.c b/scheduler/conf.c
|
||||
index 7d6da0252..0e7be0ef4 100644
|
||||
--- a/scheduler/conf.c
|
||||
+++ b/scheduler/conf.c
|
||||
@@ -2697,16 +2697,16 @@ parse_variable(
|
||||
{
|
||||
/*
|
||||
* Unknown directive! Output an error message and continue...
|
||||
+ *
|
||||
+ * Return value 1 is on purpose - we ignore unknown directives to log
|
||||
+ * error, but do not stop the scheduler in case error in configuration
|
||||
+ * is set to be fatal.
|
||||
*/
|
||||
|
||||
- if (!value)
|
||||
- cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value for %s on line %d of %s.",
|
||||
- line, linenum, filename);
|
||||
- else
|
||||
- cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown directive %s on line %d of %s.",
|
||||
- line, linenum, filename);
|
||||
+ cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown directive %s on line %d of %s.",
|
||||
+ line, linenum, filename);
|
||||
|
||||
- return (0);
|
||||
+ return (1);
|
||||
}
|
||||
|
||||
switch (var->type)
|
||||
Reference in New Issue
Block a user