Skip to content

Commit

Permalink
cfGetPrinterAttributes5(): Validate response attributes before return
Browse files Browse the repository at this point in the history
The destination can be corrupted or forged, so validate the response
to strenghten security measures.

Fixes CVE-2024-47076
  • Loading branch information
zdohnal committed Sep 26, 2024
1 parent fb2a4a2 commit 95576ec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cupsfilters/ipp.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,14 @@ cfGetPrinterAttributes5(http_t *http_printer,
ippDelete(response2);
}
}

// Check if the response is valid
if (!ippValidateAttributes(response))
{
ippDelete(response);
response = NULL;
}

if (have_http == 0) httpClose(http_printer);
if (uri) free(uri);
return (response);
Expand Down

0 comments on commit 95576ec

Please sign in to comment.