Skip to content

Commit 398fc2c

Browse files
committed
scheduler: Fix possible use_after_free in cupsdReadClient()
If cupsdSendHeader() fails, we free the connection and return -1, but in that case we try to free the connection again in cupsdReadClient().
1 parent f5813db commit 398fc2c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Changes in CUPS v2.4.17 (YYYY-MM-DD)
77

88
- The scheduler followed symbolic links when cleaning out its temporary
99
directory (Issue #1448)
10+
- Fixed possible use-after-free in `cupsdReadClient()` (Issue #1454)
1011

1112

1213
Changes in CUPS v2.4.16 (2025-12-04)

scheduler/client.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2752,10 +2752,7 @@ check_start_tls(cupsd_client_t *con) /* I - Client connection */
27522752
httpSetField(con->http, HTTP_FIELD_CONTENT_LENGTH, "0");
27532753

27542754
if (!cupsdSendHeader(con, HTTP_STATUS_OK, NULL, CUPSD_AUTH_NONE))
2755-
{
2756-
cupsdCloseClient(con);
27572755
return (-1);
2758-
}
27592756
}
27602757

27612758
return (1);

0 commit comments

Comments
 (0)