From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 35ED8138334 for ; Mon, 11 Jun 2018 13:26:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 11AE1E097B; Mon, 11 Jun 2018 13:26:19 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A7281E097B for ; Mon, 11 Jun 2018 13:26:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D7CBE335C75 for ; Mon, 11 Jun 2018 13:26:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5B4772AA for ; Mon, 11 Jun 2018 13:26:15 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1528723565.19a3c009970d2a917d4dbf7489508e1ebe41aec0.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/cups/, net-print/cups/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-print/cups/cups-2.2.8-r1.ebuild net-print/cups/cups-2.2.8.ebuild net-print/cups/cups-2.3_beta5-r1.ebuild net-print/cups/cups-2.3_beta5.ebuild net-print/cups/files/cups-2.2.8-validation_fixes.patch X-VCS-Directories: net-print/cups/files/ net-print/cups/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 19a3c009970d2a917d4dbf7489508e1ebe41aec0 X-VCS-Branch: master Date: Mon, 11 Jun 2018 13:26:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 80d81fbb-0a58-4cf3-9272-7df6ffc8eb1e X-Archives-Hash: f11ee89c51eba8dca141e525dc55ecc7 commit: 19a3c009970d2a917d4dbf7489508e1ebe41aec0 Author: Lars Wendler gentoo org> AuthorDate: Mon Jun 11 13:24:52 2018 +0000 Commit: Lars Wendler gentoo org> CommitDate: Mon Jun 11 13:26:05 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19a3c009 net-print/cups: Revbumps to fix high system load. Removed old. Bug: https://bugs.gentoo.org/657526 Package-Manager: Portage-2.3.40, Repoman-2.3.9 .../{cups-2.2.8.ebuild => cups-2.2.8-r1.ebuild} | 1 + ...s-2.3_beta5.ebuild => cups-2.3_beta5-r1.ebuild} | 1 + .../cups/files/cups-2.2.8-validation_fixes.patch | 60 ++++++++++++++++++++++ 3 files changed, 62 insertions(+) diff --git a/net-print/cups/cups-2.2.8.ebuild b/net-print/cups/cups-2.2.8-r1.ebuild similarity index 99% rename from net-print/cups/cups-2.2.8.ebuild rename to net-print/cups/cups-2.2.8-r1.ebuild index 55a2084618d..d9adea70fc4 100644 --- a/net-print/cups/cups-2.2.8.ebuild +++ b/net-print/cups/cups-2.2.8-r1.ebuild @@ -79,6 +79,7 @@ PATCHES=( "${FILESDIR}/${PN}-1.4.4-nostrip.patch" "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" + "${FILESDIR}/${PN}-2.2.8-validation_fixes.patch" #657526 ) MULTILIB_CHOST_TOOLS=( diff --git a/net-print/cups/cups-2.3_beta5.ebuild b/net-print/cups/cups-2.3_beta5-r1.ebuild similarity index 99% rename from net-print/cups/cups-2.3_beta5.ebuild rename to net-print/cups/cups-2.3_beta5-r1.ebuild index 608055933fa..ee8375c1474 100644 --- a/net-print/cups/cups-2.3_beta5.ebuild +++ b/net-print/cups/cups-2.3_beta5-r1.ebuild @@ -77,6 +77,7 @@ PATCHES=( "${FILESDIR}/${PN}-1.4.4-nostrip.patch" "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" + "${FILESDIR}/${PN}-2.2.8-validation_fixes.patch" #657526 ) MULTILIB_CHOST_TOOLS=( diff --git a/net-print/cups/files/cups-2.2.8-validation_fixes.patch b/net-print/cups/files/cups-2.2.8-validation_fixes.patch new file mode 100644 index 00000000000..ef87b6a81d8 --- /dev/null +++ b/net-print/cups/files/cups-2.2.8-validation_fixes.patch @@ -0,0 +1,60 @@ +From 455c52a027ab3548953372a0b7bdb0008420e9ba Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Fri, 8 Jun 2018 22:29:50 +0200 +Subject: [PATCH] Fix validation rejecting all NAME and TEXT attrs + +When the UTF-8 validation loop finishes successfully, `*ptr` points at +the `'\0'` at the end of the string. The code misinterpreted this as a +control character (`*ptr < ' '`) and failed the validation. + +Fixes https://github.com/apple/cups/issues/5325 +--- + cups/ipp.c | 24 ++++++++++-------------- + 1 file changed, 10 insertions(+), 14 deletions(-) + +diff --git a/cups/ipp.c b/cups/ipp.c +index 95d53cc44..204c71fcd 100644 +--- a/cups/ipp.c ++++ b/cups/ipp.c +@@ -5030,15 +5030,13 @@ ippValidateAttribute( + else if (*ptr & 0x80) + break; + else if ((*ptr < ' ' && *ptr != '\n' && *ptr != '\r' && *ptr != '\t') || *ptr == 0x7f) +- break; ++ { ++ ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text); ++ return (0); ++ } + } + +- if (*ptr < ' ' || *ptr == 0x7f) +- { +- ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text); +- return (0); +- } +- else if (*ptr) ++ if (*ptr) + { + ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text); + return (0); +@@ -5088,15 +5086,13 @@ ippValidateAttribute( + else if (*ptr & 0x80) + break; + else if (*ptr < ' ' || *ptr == 0x7f) +- break; ++ { ++ ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text); ++ return (0); ++ } + } + +- if (*ptr < ' ' || *ptr == 0x7f) +- { +- ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text); +- return (0); +- } +- else if (*ptr) ++ if (*ptr) + { + ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text); + return (0);