From patchwork Wed Nov 13 15:19:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Kuster X-Patchwork-Id: 179316 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp9747302ilf; Wed, 13 Nov 2019 07:23:24 -0800 (PST) X-Google-Smtp-Source: APXvYqw4BfJtqmReQw2Ti76NZrjRTfxoDYltvQOwmjfn0J58R8oGXxoXeleX4djs//z31OJa9xIK X-Received: by 2002:a63:5a0f:: with SMTP id o15mr4290055pgb.319.1573658604109; Wed, 13 Nov 2019 07:23:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573658604; cv=none; d=google.com; s=arc-20160816; b=umyBAmJrLIMBnXU5w6HeTml022S4CdjJpd7Jmm2Iz29675nLZHdncLlXaiBV0Oiu7V LpptESwudd6ZaI+tFAm/96AwFPH5MHesq3bad82bZN2ZEflRPuxcjC3qoXqKTN8Etu4p aDV81yuYTH4oVACgo9h8fCPgi0FMgoMhZROwntnQKUaLQW8qYwwogLW7VR1+rPMUFFUH NoEKkg5iwExeOY9Quse0qI3ZpfbXwXUfHYOi3LkI32I5E5r9/ZI1SqzirnbPkLXrlc5s Jh+U3U+5HP2XhdeuRPRD+mOdus028/XNbHKRemlBrPKaEph9SO+fGN4qWmGyH/Zy27h9 ZQCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=T8Vw/TGg+YVlWmbXkyXqy+0yYVUNA4xWSV5+6i6gHq8=; b=BoFoeL+UUO4McKNJFctGo3gLWAIlDicb+G3m79DDnU3oDJbkcXBH29BZMiAUjxzzj8 lH4R9GPQkChyV1YSWSXa8kjkMp9DqV7swpGL7v7P40kyF4AgdX1Wx7NGY3pqppjrILbS knDUx7+VIc1k7tx4oJiZH729iomsXXNYdVXneayfGBqAmysVIqt4h+i8UPjGW638c9Ih fWbdCvIn4DhTUa/dbI0ZUrSDsXPTPzvEl9N03wr/LdIj7ZgHhxYfvpNlBhskuzJx93LP LlaXd5otA4h4g/ThMayhMn2CoAvOkvUgmmZNIPwe2qez1GWszA4mIqkY0/GZZEceKxAT /D3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=SSAXnmWw; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id t19si3058298plj.100.2019.11.13.07.23.23; Wed, 13 Nov 2019 07:23:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=SSAXnmWw; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 728E87F895; Wed, 13 Nov 2019 15:20:35 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by mail.openembedded.org (Postfix) with ESMTP id 3950D7F685 for ; Wed, 13 Nov 2019 15:20:09 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id x28so1870833pfo.6 for ; Wed, 13 Nov 2019 07:20:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=UnB+qFtf7XRTf1acXkY+pelryarBLz4L3x6kJa6PSfw=; b=SSAXnmWwiHokAbx6dEZF8a7NEYzqsUzBWLia7fXEzZq7pR9wOLLua3yMJIyTYldwBP hQ3OpIMDYOCMCGuheotqkqAwxBm9TgFS/4ofgi+q2j4XU/ozLU+iOpbILZyoFFKWqs6E EXwjMepC1UUSSclgPCupjcs9hSLVrPbZ8m3biqNMRX8mjzfuEsqmgI6QsTJcUI9e8BmI FAdqDVqvWtjFxFzGCa6sN0Is1GgRxB8mFBd2ivSEjj6uNGx9B5vql8Am1kVzipBYB5tm YwuNYDC4HwFIe6dDW/+kfIVQj+5vkGrm2nykaFDUDELaDXl60mT5g0+Ls9igLgzCIrJf 8lDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=UnB+qFtf7XRTf1acXkY+pelryarBLz4L3x6kJa6PSfw=; b=TIE4FRx/P2oeoxvobRKnC8/oAWM+v6Z8VtAKGG9UpKdNouTm3pikjANmGeneLn5Pc7 ydgOFrpjMALokSElRWHY8CRguerZPqG3FA5fqWEeZuMrzhfAji5GJMkdui3+gig4cwIg goSQawTLLthBy9dZTL8pKhrHPcndKJJZ7eTL4HftZ0mXfGG230niu8WwErsmu1Wm30wK oYa2GazHrcoKyO+MsM3F9xayX2Of0u4HE4NtZUBDv4LBzf15LJcZ2Vduo4kgkVHiMbuI 6WxVkIC0fPC5/kvKCAYdpHh+k8+7jx10CBie5urJpRXkk7oTo1ydOU65sTfV56/2j613 FDWw== X-Gm-Message-State: APjAAAWAPdi4LDE/LjKk12Ld9iOghlE+BnSBKy9Gs5EcgXCMW6TAiSK7 rigvlbfUi/Yig7yu5UEpj36ZAs45 X-Received: by 2002:a17:90a:1424:: with SMTP id j33mr5859674pja.2.1573658410000; Wed, 13 Nov 2019 07:20:10 -0800 (PST) Received: from akuster-ThinkPad-T460s.mvista.com ([2601:202:4180:a5c0:2cf9:53ea:e6ab:d378]) by smtp.gmail.com with ESMTPSA id t8sm2622242pjr.25.2019.11.13.07.20.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Nov 2019 07:20:09 -0800 (PST) From: Armin Kuster To: openembedded-core@lists.openembedded.org Date: Wed, 13 Nov 2019 07:19:27 -0800 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Subject: [OE-core] [warrior 24/25] patch: the CVE-2019-13638 fix also handles CVE-2018-20969 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org From: Ross Burton Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster --- .../patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch b/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch index f60dfe8..d13d419 100644 --- a/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch +++ b/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch @@ -6,8 +6,8 @@ Subject: [PATCH] Invoke ed directly instead of using the shell * src/pch.c (do_ed_script): Invoke ed directly instead of using a shell command to avoid quoting vulnerabilities. -CVE: CVE-2019-13638 -Upstream-Status: Backport[https://git.savannah.gnu.org/cgit/patch.git/patch/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0] +CVE: CVE-2019-13638 CVE-2018-20969 +Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/patch.git/patch/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0] Signed-off-by: Trevor Gamblin --- From patchwork Wed Nov 13 15:19:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Kuster X-Patchwork-Id: 179317 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp9747468ilf; Wed, 13 Nov 2019 07:23:33 -0800 (PST) X-Google-Smtp-Source: APXvYqxaOMkxBTkJeCx+yeo9fdfTH0/iXtb3HRYBCwH/EJjEZi0lwJj7nl7ZWkvq4F5zJYrJbZgQ X-Received: by 2002:a17:90a:19dc:: with SMTP id 28mr5866697pjj.32.1573658612898; Wed, 13 Nov 2019 07:23:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573658612; cv=none; d=google.com; s=arc-20160816; b=gash1krvE1S6WxQCoRNGAJ1Fi0kGSH9ItiG0Wc49KQiPx1AazyItAf0kOWcNINo2X/ f+ymgxh6ocgkPIdlmBePQ0r3Q08oJ/huHALeaeXll8c2YA2pNRLktyMSRnfE6UWCZpMX KEMRmYKEZJVkT2X/U4wL+Z1NHQOJ09LRd/yW50dccvarQueruKMeH6j1GK/tqvy1DHvw n2wvgoNZJ4ZRZ4d15z/V830Huw3RFfMb0YaVGSnNzzPhFKKjapCJtDfs0roAjSaFBQ35 ssuhJoCS+GvlZkRAr4VH+ka8N7hhEYZMMfxBA4LTCiF+2lBqbqvDb2winLVNybsCzmbF RMtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=puhiBPP5B7VdQUEY4ezx23KiQg3zmWvlFzO8o52cArw=; b=w2IQenlj9zDYjEQ26iC2vRzR4LGs7CxiZSskIGWvinCqCb3nmmd8NXR5zDCnF/+C55 iblp7Y/JDmK8cOxLM3Zq26dGTauLdlPR52MB5VhVauG7LzufRDIYjidc3FmJGNWvXAA2 9gcBqGpQM+GimpX4jXNmGS8awDy0Qen7msBDQt/yUEuZmIyK2V9LlwkiKk6NPyBmTwbD f+RFkE1AqOKmwThYLdkyFWx9vWUhseEj+R5BELFg6/Z0e/n+AQ0QwttvOtyJuSTajKI0 9DCVdTp4/MErVRrce1A+St3CWk/HuLdDgRglRrePGFSBagNXLBKCeZd1yLuBip1oAaBs 3Clw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="G5ru/4tU"; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id z5si3229995pgc.162.2019.11.13.07.23.32; Wed, 13 Nov 2019 07:23:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="G5ru/4tU"; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id C6E597F89E; Wed, 13 Nov 2019 15:20:36 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mail.openembedded.org (Postfix) with ESMTP id 3C69A7F7C9 for ; Wed, 13 Nov 2019 15:20:10 +0000 (UTC) Received: by mail-pf1-f178.google.com with SMTP id q13so1877563pff.2 for ; Wed, 13 Nov 2019 07:20:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=JMwubMdWpFifMzl89mTTlj/8AHwkDlvQW6SDTDOW4/s=; b=G5ru/4tUAVGyw7AWWB7FV4KB4ifQoWcgm0CSin57MF9BtMRLV8SB3QP5s3PC2y5vd4 PkARZLDun4S+Z7hRBwShZHWFNe/i7ICgXPuWvcWuFWC4P1W9ySVFwIVl5hHvJ6oUaggU FJgpBuBp4kDsnyw+kPnNDW4QXJ7IiBTu0SHF0nDwdvyxzv1WFEWUe3LYdyg7g4bH6kRo NPrF8fhXZSDQd+FkvpB5xtDWdvihGl6/LrK9BH9TwsOafa/H879wovp6Ig4roDcU71Js vu8b00UwAs3w3rU+ggfV+XSjijOjUkBnwC7WFxz0kujZEDvGuTU8ETXiItpuwa0nQTw+ AZcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=JMwubMdWpFifMzl89mTTlj/8AHwkDlvQW6SDTDOW4/s=; b=jHaW6zSnNcJlDjY2M9T3ro6b9zRE4/BiQWC7F4dIyXcUp5ojXXBrE64GdhQxO7r5Wt 7AFVlXvc9V9JvpM1y6iMCMNpmbcSn57MEzwVyuXUBQ5cPbiee3kvGe0trt0vUlkfqBoi YZ3U0UbAmvHoYm5zMCzKoBMccT9gnoiOqJWYnWgDW5za8ybCbj+zTiDuPD3hAQmd9wsZ aqzBVA3z8AQSMa4e0K1qRZoUhk0SKuZxSL6w6EXGEFLVkeGyJ/mu7ApoKi2Y+unu3SnV FSgguoie5/2cIdL7EqRasy+OEIJH5DRbIsO3StQXR+3VGtLwveuB5RBO/lZOM0RGy1fV aoYQ== X-Gm-Message-State: APjAAAWBkVyPGbx11nNHlGdamLh9iY7atG7ZFU/F6EO2PpZhBkro23rQ ESTgOpVFNWKp+SjpwLB4Zv1WZbtX X-Received: by 2002:a17:90a:d155:: with SMTP id t21mr5492679pjw.84.1573658410923; Wed, 13 Nov 2019 07:20:10 -0800 (PST) Received: from akuster-ThinkPad-T460s.mvista.com ([2601:202:4180:a5c0:2cf9:53ea:e6ab:d378]) by smtp.gmail.com with ESMTPSA id t8sm2622242pjr.25.2019.11.13.07.20.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Nov 2019 07:20:10 -0800 (PST) From: Armin Kuster To: openembedded-core@lists.openembedded.org Date: Wed, 13 Nov 2019 07:19:28 -0800 Message-Id: <0a1b1e88b936177344392e185fbd077622d88b3e.1573658232.git.akuster808@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Subject: [OE-core] [warrior 25/25] file: fix CVE-2019-18218 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org From: Ross Burton Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster --- .../file/file/CVE-2019-18218.patch | 55 ++++++++++++++++++++++ meta/recipes-devtools/file/file_5.36.bb | 3 +- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/file/file/CVE-2019-18218.patch -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/file/file/CVE-2019-18218.patch b/meta/recipes-devtools/file/file/CVE-2019-18218.patch new file mode 100644 index 0000000..3d02c5a --- /dev/null +++ b/meta/recipes-devtools/file/file/CVE-2019-18218.patch @@ -0,0 +1,55 @@ +cdf_read_property_info in cdf.c in file through 5.37 does not restrict the +number of CDF_VECTOR elements, which allows a heap-based buffer overflow (4-byte +out-of-bounds write). + +CVE: CVE-2019-18218 +Upstream-Status: Backport +Signed-off-by: Ross Burton + +From 46a8443f76cec4b41ec736eca396984c74664f84 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Mon, 26 Aug 2019 14:31:39 +0000 +Subject: [PATCH] Limit the number of elements in a vector (found by oss-fuzz) + +--- + src/cdf.c | 9 ++++----- + src/cdf.h | 1 + + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/cdf.c b/src/cdf.c +index 9d6396742..bb81d6374 100644 +--- a/src/cdf.c ++++ b/src/cdf.c +@@ -1016,8 +1016,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h, + goto out; + } + nelements = CDF_GETUINT32(q, 1); +- if (nelements == 0) { +- DPRINTF(("CDF_VECTOR with nelements == 0\n")); ++ if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) { ++ DPRINTF(("CDF_VECTOR with nelements == %" ++ SIZE_T_FORMAT "u\n", nelements)); + goto out; + } + slen = 2; +@@ -1060,8 +1061,6 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h, + goto out; + inp += nelem; + } +- DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n", +- nelements)); + for (j = 0; j < nelements && i < sh.sh_properties; + j++, i++) + { +diff --git a/src/cdf.h b/src/cdf.h +index 2f7e554b7..05056668f 100644 +--- a/src/cdf.h ++++ b/src/cdf.h +@@ -48,6 +48,7 @@ + typedef int32_t cdf_secid_t; + + #define CDF_LOOP_LIMIT 10000 ++#define CDF_ELEMENT_LIMIT 100000 + + #define CDF_SECID_NULL 0 + #define CDF_SECID_FREE -1 diff --git a/meta/recipes-devtools/file/file_5.36.bb b/meta/recipes-devtools/file/file_5.36.bb index 1a81fde..f169671 100644 --- a/meta/recipes-devtools/file/file_5.36.bb +++ b/meta/recipes-devtools/file/file_5.36.bb @@ -14,7 +14,8 @@ DEPENDS_class-native = "zlib-native" # Blacklist a bogus tag in upstream check UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P(?!6_23).+)" -SRC_URI = "git://github.com/file/file.git" +SRC_URI = "git://github.com/file/file.git \ + file://CVE-2019-18218.patch" SRCREV = "f3a4b9ada3ca99e62c62b9aa78eee4935a8094fe" S = "${WORKDIR}/git"