Skip to content

Commit 595d691

Browse files
committed
cupsd: Block authentication using alternate method
Fixes: CVE-2025-58060
1 parent 2777330 commit 595d691

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

scheduler/auth.c

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,16 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
513513
int userlen; /* Username:password length */
514514

515515

516+
/*
517+
* Only allow Basic if enabled...
518+
*/
519+
520+
if (type != CUPSD_AUTH_BASIC)
521+
{
522+
cupsdLogClient(con, CUPSD_LOG_ERROR, "Basic authentication is not enabled.");
523+
return;
524+
}
525+
516526
authorization += 5;
517527
while (isspace(*authorization & 255))
518528
authorization ++;
@@ -558,7 +568,6 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
558568
* Validate the username and password...
559569
*/
560570

561-
if (type == CUPSD_AUTH_BASIC)
562571
{
563572
#if HAVE_LIBPAM
564573
/*
@@ -727,6 +736,16 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
727736
/* Output token for username */
728737
gss_name_t client_name; /* Client name */
729738

739+
/*
740+
* Only allow Kerberos if enabled...
741+
*/
742+
743+
if (type != CUPSD_AUTH_NEGOTIATE)
744+
{
745+
cupsdLogClient(con, CUPSD_LOG_ERROR, "Kerberos authentication is not enabled.");
746+
return;
747+
}
748+
730749
# ifdef __APPLE__
731750
/*
732751
* If the weak-linked GSSAPI/Kerberos library is not present, don't try

0 commit comments

Comments
 (0)