]> git.ipfire.org Git - thirdparty/cups.git/commit
http.c: Fix infinite loop in GTK print dialog 1439/head
authorZdenek Dohnal <zdohnal@redhat.com>
Wed, 3 Dec 2025 08:39:02 +0000 (09:39 +0100)
committerZdenek Dohnal <zdohnal@redhat.com>
Wed, 3 Dec 2025 08:39:02 +0000 (09:39 +0100)
commit6efa179b8446a7999b9149c5101fb11580ea8998
tree035dbbb996185a03787ddaa2c952f897efc79414
parent2e818010c9cda04649c872646dd3b90686e309ab
http.c: Fix infinite loop in GTK print dialog

GTK has a specific IPP processing which stopped working after
CVE-2025-58436 fix. GTK depends on internal behavior of `_httpUpdate()`
which read a line from connection at the start of function, which was
one of culprits behind CVE-2025-58436.

To mitigate CVE-2025-58436 `_httpUpdate()` started to read from
connection only if there was data in internal HTTP buffer and there
was at least one newline buffered - otherwise the function returns
HTTP_ERROR/HTTP_CONTINUE, which caused the loop in GTK.

The change which fixes GTK behavior in the PR is to read data from
connection at the start of `_httpUpdate()` for non-blocking connections
immediately with no timeout if internal HTTP buffer is not full. The
change mitigates the CVE as well as the previous implementation.

Fixes #1429
cups/http.c