From 3e80a27b8181bd3059e11050eb0a3f4db2dae41d Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: May 21 2020 08:51:11 +0000 Subject: 1838455 - ipp/socket backends connect to turned off device for eternity (contimeout is not applied) --- diff --git a/cups-etimedout.patch b/cups-etimedout.patch new file mode 100644 index 0000000..31defda --- /dev/null +++ b/cups-etimedout.patch @@ -0,0 +1,25 @@ +diff --git a/cups/http-addrlist.c b/cups/http-addrlist.c +index e4ffc3d..a989055 100644 +--- a/cups/http-addrlist.c ++++ b/cups/http-addrlist.c +@@ -240,7 +240,10 @@ httpAddrConnect2( + } + + if (!addrlist && nfds == 0) ++ { ++ errno = EHOSTDOWN; + break; ++ } + + /* + * See if we can connect to any of the addresses so far... +@@ -371,6 +374,9 @@ httpAddrConnect2( + remaining -= 250; + } + ++ if (remaining <= 0) ++ errno = ETIMEDOUT; ++ + while (nfds > 0) + { + nfds --; diff --git a/cups.spec b/cups.spec index 3a5e7d1..4448f2a 100644 --- a/cups.spec +++ b/cups.spec @@ -15,7 +15,7 @@ Summary: CUPS printing system Name: cups Epoch: 1 Version: 2.2.12 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2+ and LGPLv2+ with exceptions and AML Url: http://www.cups.org/ Source0: https://github.com/apple/cups/releases/download/v%{VERSION}/cups-%{VERSION}-source.tar.gz @@ -111,6 +111,8 @@ Patch43: cups-default-lpoptions.patch Patch44: cups-autostart-when-enabled.patch # 1826330 - CVE-2020-3898 cups: heap based buffer overflow in libcups's ppdFindOption() in ppd-mark.c Patch45: cups-ppdopen-heap-overflow.patch +# 1838455 - ipp/socket backends connect to turned off device for eternity (contimeout is not applied) +Patch46: cups-etimedout.patch ##### Patches removed because IMHO they aren't no longer needed ##### but still I'll leave them in git in case their removal @@ -366,6 +368,8 @@ Sends IPP requests to the specified URI and tests and/or displays the results. %patch44 -p1 -b .autostart-when-enabled # 1826330 - CVE-2020-3898 cups: heap based buffer overflow in libcups's ppdFindOption() in ppd-mark.c %patch45 -p1 -b .ppdopen-heap-overflow +# 1838455 - ipp/socket backends connect to turned off device for eternity (contimeout is not applied) +%patch46 -p1 -b .etimedout # if cupsd is set to log into /var/log/cups, then 'MaxLogSize 0' needs to be # in cupsd.conf to disable cupsd logrotate functionality and use logrotated @@ -418,6 +422,7 @@ export CFLAGS="$RPM_OPT_FLAGS -fstack-protector-all -DLDAP_DEPRECATED=1" --with-xinetd=no \ --with-access-log-level=actions \ --enable-page-logging \ + --with-rundir=/run/cups \ localedir=%{_datadir}/locale # If we got this far, all prerequisite libraries must be here. @@ -778,6 +783,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man5/ipptoolfile.5.gz %changelog +* Thu May 21 2020 Zdenek Dohnal - 1:2.2.12-9 +- 1838455 - ipp/socket backends connect to turned off device for eternity (contimeout is not applied) + * Tue Apr 21 2020 Zdenek Dohnal - 1:2.2.12-8 - 1826330 - CVE-2020-3898 cups: heap based buffer overflow in libcups's ppdFindOption() in ppd-mark.c