-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect error handling in httpGets2 #879
Comments
Closes: OpenPrinting#879 In case of some errors httpGets2 waits for the next packet. In all cases of errors it should return NULL. Signed-off-by: Heinrich Schuchardt <[email protected]>
Closes: OpenPrinting#879 In case of some errors httpGets2 waits for the next packet. In all other cases of errors it should return NULL to avoid negative values of http->used leading to ending up in an endless loop. Signed-off-by: Heinrich Schuchardt <[email protected]>
The discussion happens on the PR, setting the correct label. |
Unfortunately, the fix for this bug is not actually working. In Ubuntu 24.04 the fix is applied but the bug still occurs. See https://bugs.launchpad.net/ubuntu/+source/cups-browsed/+bug/2067918 and there expecially comment #10 https://bugs.launchpad.net/ubuntu/+source/cups-browsed/+bug/2067918/comments/10 |
Many users of Ubuntu 24.04 are still reporting this very same problem. |
Are you sure that the fix has been applied in Ubuntu 24.04? I looked at the source (via |
@tillkamppeter Can you respond to @jknockel ? |
Sorry for the late reply. I was very busy, had some days off, a conference, and now there was also the vulnerability. I have checked now and the upstream introduction of the fix was in 2.4.8 and 24.04 has only 2.4.7, and I see no distro patch in 2.4.7 which backports the fix. Probably the fix was too late for the release of 24.04 LTS. We need to somehow test it, in 24.10 (which has CUPS 2.4.10 which contains it) and perhaps also a 2.4.7 with backported fix in a PPA for 24.04, to check whether one could do an SRU. |
I got somebody reporting to still have the cups-browsed issue on Ubuntu 24.10 with CUPS 2.4.10: https://bugs.launchpad.net/ubuntu/+source/cups-browsed/+bug/2049315/comments/29 As CUPS 2.4.10 contains the changes described in this issue report, it seems that the change does not fix the issue. |
For me it also looks like that the patch is without effect, as if the added |
@tillkamppeter According to the bug report, |
I have checked now and the Ubuntu package of CUPS does not apply any patches to I also had a look through the code of |
It is easy to see when reviewing the code of The code of cups-browsed ( So only thing which could cause |
Describe the bug
cups-browsed runs into an infinite loop in httpGets.
To Reproduce
The issues was sometimes observed in cups-browsed on Ubuntu 24.04. See https://bugs.launchpad.net/ubuntu/+source/cups-browsed/+bug/2049315.
Expected behavior
httpGets2 should not enter an endless loop if a connection error occurs or the webserver provides invalid data.
System Information:
Additional context
Debugging showed negative values of http->used in httpGets.
Some error paths lead to negative numbers being added to http->used. The following diff should avoid this:
The text was updated successfully, but these errors were encountered: