File cups-2.2.7-CVE-2025-58060.patch of Package cups.40432
--- scheduler/auth.c.orig 2018-03-23 04:48:36.000000000 +0100
+++ scheduler/auth.c 2025-09-03 09:46:21.127995909 +0200
@@ -518,6 +518,16 @@ cupsdAuthorize(cupsd_client_t *con) /* I
int userlen; /* Username:password length */
+ /*
+ * Only allow Basic if enabled...
+ */
+
+ if (type != CUPSD_AUTH_BASIC)
+ {
+ cupsdLogClient(con, CUPSD_LOG_ERROR, "Basic authentication is not enabled.");
+ return;
+ }
+
authorization += 5;
while (isspace(*authorization & 255))
authorization ++;
@@ -563,10 +573,6 @@ cupsdAuthorize(cupsd_client_t *con) /* I
* Validate the username and password...
*/
- switch (type)
- {
- default :
- case CUPSD_AUTH_BASIC :
{
#if HAVE_LIBPAM
/*
@@ -720,8 +726,6 @@ cupsdAuthorize(cupsd_client_t *con) /* I
}
cupsdLogClient(con, CUPSD_LOG_DEBUG, "Authorized as \"%s\" using Basic.", username);
- break;
- }
con->type = type;
}
@@ -738,6 +742,15 @@ cupsdAuthorize(cupsd_client_t *con) /* I
/* Output token for username */
gss_name_t client_name; /* Client name */
+ /*
+ * Only allow Kerberos if enabled...
+ */
+
+ if (type != CUPSD_AUTH_NEGOTIATE)
+ {
+ cupsdLogClient(con, CUPSD_LOG_ERROR, "Kerberos authentication is not enabled.");
+ return;
+ }
# ifdef __APPLE__
/*