[cups-devel] [MOD] STR #4386: Race condition in cupsDoIORequest()

twaugh at redhat.com twaugh at redhat.com
Wed Mar 5 08:15:04 PST 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

The situation is this:

libcups sends HTTP part of request -->
  <-- server responds with HTTP_UNAUTHORIZED and closes connection
libcups sends IPP part of request -->
caller gets NULL response and cupsLastErrorString() is "Broken pipe"

An alternate timeline is this:

libcups sends HTTP part of request -->
libcups sends IPP part of request -->
  <-- server responds with HTTP_UNAUTHORIZED and closes connection
libcups retries but with auth -->
  <-- server gives response

When cupsDoIORequest() sends a request that will fail due to lack of
credentials, if the server closes the connection after cupsSendRequest()
returned but before ippWrite() finishes sending the request then the
request will not be retried and the caller will see a failure.

Original report:
  https://bugzilla.redhat.com/show_bug.cgi?id=1072952

Link: https://www.cups.org/str.php?L4386
Version: 1.7.1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJTF02IAAoJENujp6sI12IjceIP/iv4CRoKeX+Eze4ibLFetgi7
Ub52nMrJgWYJdpVqyE/chQtXXLdMr1YZt97DMDUEkZFcZA3+F8VV+ZZKPF0ZdhdB
Q3mjnj/utDyFyOoKMS+2/ITvc+BXUYiwCt9Ml75lm3Yw3uUmUixJufeP/18Pq1Nm
Kt1h/gPdKkRk6fVIwe4fheZ63phDw12d6j6Y3H1Ki30hv+n7lC/baVNmr33Dq/2z
+lyz0ARA4CY5v6+84HMYmb9Mo3pljg8lSNVOOluO0LdrTjxqJolRDIjW0wIADYV2
0jiOvKN9eL3c/h6PVGqsRGhqwmdoYSL7XyhCJBRsO41zjZtbQmvMUFxv82midnKe
3xILaPAQ66SjnBdoKCB+mwuBL+bIKIARtHhCFzdOpjoDSi1yehp0NVzpjKM7IVh0
GHcBosXpSiSW8oQcUU5z2y7rLKap90pIB84vYtsr3xAh7bJf02HfSXH20tu0e7jn
bn6GXT+YjyNe4TOKg5+OaDVkOqfVeBrOK7/qadYMR3B9DtJDAOKlo3nA3moZXzxP
17mbaBhVc0m+GJVdE0snim4/JnZaV4nYVaL0y9m6Dj/kaf3/HpNhxdC0Me7gpQjN
yMjFq6dtmp6lX/qHPF0A5kKGerhH3zCsKMwcDBbd3svGgRExYNw8s34ccvh3sRsl
zilbyGIWnIlJU/qoS/kM
=vYIt
-----END PGP SIGNATURE-----




More information about the cups-devel mailing list