Skip to content

Commit b4a4005

Browse files
committed
Validate printer/server responses (GHSA-hp44-ph36-rc52)
1 parent 3f0b1ac commit b4a4005

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎CHANGES.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ v3.0.4 - YYYY-MM-DD
66

77
- SECURITY-3.5: Updated `cupsOAuthGetTokens` to do more validation of the access
88
token (GHSA-mq7v-g5c2-75fg)
9+
- SECURITY-2.3: `cupsGetDests` did not validate printer/server responses
10+
(GHSA-hp44-ph36-rc52)
911
- Added `cupsDNSSDSetHostName` function.
1012
- Added Swedish localization (Issue #174)
1113
- Added missing `cups_serverroot` variable to "pkg-config" file.

‎cups/dest.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,14 @@ _cupsGetDests(http_t *http, // I - Connection to server or `CUPS_HTTP_DEF
11621162
// Do the request and get back a response...
11631163
if ((response = cupsDoRequest(http, request, "/")) != NULL)
11641164
{
1165+
// Make sure the server is OK...
1166+
if (!ippValidateAttributes(response))
1167+
{
1168+
// No, don't try to use any of its response...
1169+
ippDelete(response);
1170+
return (num_dests);
1171+
}
1172+
11651173
for (attr = response->attrs; attr != NULL; attr = attr->next)
11661174
{
11671175
// Skip leading attributes until we hit a printer...

0 commit comments

Comments
 (0)