From patchwork Thu Jul 25 04:03:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anuj Mittal X-Patchwork-Id: 169666 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp11081488ilk; Wed, 24 Jul 2019 21:04:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2C5H7YrycXe0vJJJhXA6goW44H4NZFfUPj64ea45fZEBgbXPhQwVhegwgsXIZ3dWwBjrT X-Received: by 2002:a63:30c6:: with SMTP id w189mr81720565pgw.398.1564027478184; Wed, 24 Jul 2019 21:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564027478; cv=none; d=google.com; s=arc-20160816; b=gDOKkrZJ8FEFhT052/HPMNS7ttPg7b7KtBBL7LJLz4atO1PDRMI8njdKgz1xmYMMhp 9FwtK8umZY1am0kHc70GT2z3ImCH4a2oPAAjI29mofBJJ9pa0P7pX+gHMnLUctP5kAeD GwP6x1urRqt4r/vvt30WItNy7+uLVeNJThGVqvOZ39wC3xmiGNABF1Fps83r2bKFBWn6 fZUq9mIN6JKozWWUoXC7Q6zVqqVzilFQEkYiw0fA3+41cJlALQoczkqzQFcajj6TB1K6 2/HMpN2kpZI/m95WTfO6O4T5NLF32uQtCnWA+KqfLbxxyK1IT2sGlrDATwJhLe73nisD 4zsw== 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:delivered-to; bh=rBfinBssqStyIXAFv6vLIyia2emgQcpjXq/PW1XVVjQ=; b=BqN45Sen2RJk+y5COldHNy/1CsFoctnbvyfShQLLw/51IqZlMxWqOk6NGqkQJxkALk 98QBUnzPv5+gzGnB3Chj3uz048dEqL2HTZYYCiXeJvADVi3T3E8X9MpewX7qopQyV+Qz d0wcQvJzjLrMPShYX/vIYJmmgjbl8CGjf3MJx7UzixSVBSPsDdSgDlNvo3+2+qLHq682 lM3OD06UkJ61i6MN8Auiviod21/Q8jRjw+d1j9yL1S00ppj4aEj6AvARlQQuYdjjatBJ chGJb9CmeLI/hKwWi3YRhezD8xtOUlTLjIBm/4wQ6zEvHv+Zbfckc2lM+FL+rn7LZ8Dx y3Ow== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id f26si18014634pfd.193.2019.07.24.21.04.37; Wed, 24 Jul 2019 21:04:38 -0700 (PDT) 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; 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=NONE dis=NONE) header.from=intel.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 F05527F1DE; Thu, 25 Jul 2019 04:04:14 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mail.openembedded.org (Postfix) with ESMTP id 656847F0EC for ; Thu, 25 Jul 2019 04:03:35 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2019 21:03:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,305,1559545200"; d="scan'208";a="189233232" Received: from andromeda02.png.intel.com ([10.221.183.11]) by fmsmga001.fm.intel.com with ESMTP; 24 Jul 2019 21:03:36 -0700 From: Anuj Mittal To: akuster808@gmail.com, openembedded-core@lists.openembedded.org Date: Thu, 25 Jul 2019 12:03:01 +0800 Message-Id: <1564027386-8107-6-git-send-email-anuj.mittal@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564027386-8107-1-git-send-email-anuj.mittal@intel.com> References: <1564027386-8107-1-git-send-email-anuj.mittal@intel.com> Subject: [OE-core] [warrior][PATCH 06/11] libid3tag: handle unknown encodings (CVE-2017-11550) 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 (From OE-Core rev: 5090afc1b07e62f70ebcf63a7abb75b8552f0a52) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- .../libid3tag/libid3tag/unknown-encoding.patch | 39 ++++++++++++++++++++++ .../libid3tag/libid3tag_0.15.1b.bb | 1 + 2 files changed, 40 insertions(+) create mode 100644 meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.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-multimedia/libid3tag/libid3tag/unknown-encoding.patch b/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch new file mode 100644 index 0000000..f0867b5 --- /dev/null +++ b/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch @@ -0,0 +1,39 @@ +In case of an unknown/invalid encoding, id3_parse_string() will +return NULL, but the return value wasn't checked resulting +in segfault in id3_ucs4_length(). This is the only place +the return value wasn't checked. + +Patch taken from Debian: +https://sources.debian.org/patches/libid3tag/0.15.1b-14/11_unknown_encoding.dpatch/ + +CVE: CVE-2017-11550 +Upstream-Status: Pending +Signed-off-by: Ross Burton + +diff -urNad libid3tag-0.15.1b~/compat.gperf libid3tag-0.15.1b/compat.gperf +--- libid3tag-0.15.1b~/compat.gperf 2004-01-23 09:41:32.000000000 +0000 ++++ libid3tag-0.15.1b/compat.gperf 2007-01-14 14:36:53.000000000 +0000 +@@ -236,6 +236,10 @@ + + encoding = id3_parse_uint(&data, 1); + string = id3_parse_string(&data, end - data, encoding, 0); ++ if (!string) ++ { ++ continue; ++ } + + if (id3_ucs4_length(string) < 4) { + free(string); +diff -urNad libid3tag-0.15.1b~/parse.c libid3tag-0.15.1b/parse.c +--- libid3tag-0.15.1b~/parse.c 2004-01-23 09:41:32.000000000 +0000 ++++ libid3tag-0.15.1b/parse.c 2007-01-14 14:37:34.000000000 +0000 +@@ -165,6 +165,9 @@ + case ID3_FIELD_TEXTENCODING_UTF_8: + ucs4 = id3_utf8_deserialize(ptr, length); + break; ++ default: ++ /* FIXME: Unknown encoding! Print warning? */ ++ return NULL; + } + + if (ucs4 && !full) { diff --git a/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb b/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb index 43edd3f..0312a61 100644 --- a/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb +++ b/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb @@ -14,6 +14,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libid3tag-${PV}.tar.gz \ file://obsolete_automake_macros.patch \ file://0001-Fix-gperf-3.1-incompatibility.patch \ file://10_utf16.patch \ + file://unknown-encoding.patch \ " UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/mad/files/libid3tag/" UPSTREAM_CHECK_REGEX = "/projects/mad/files/libid3tag/(?P.*)/$"