From patchwork Tue Sep 24 02:48:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Kuster X-Patchwork-Id: 174243 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3584178ill; Mon, 23 Sep 2019 19:50:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNs5mEioWUA5MQQJnP+yX4BzhoIsxPB3GSw1pOmp/SNR6nYIzGa4HOwmzHWHO7GZhTThtG X-Received: by 2002:a62:18d6:: with SMTP id 205mr757017pfy.90.1569293420021; Mon, 23 Sep 2019 19:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569293420; cv=none; d=google.com; s=arc-20160816; b=oggRIfMFA1OA+rKex1d4S/Ulyp0L7klaS37Dg0YM0wZdRkMuCUzmCvRw2tky7qLdOJ bDZlk9vj7ZgRY2JImmIzCKkmbCCgOGhfjrxSrroCSGQ03MHBpy/8V4x/y/6oavFyZlVJ VeRv1Z2f1lowhAOFhCpGioGNqNnzjTJ604DYRcbY0SWCixk1+EW0wEtu1I1s3T25c96g LPLlcLd6IIJV/cTmLM03iSv9p/Rx856AB5PVYFozr15SlDj9d8UnwTUhYmJsyvxfbXp+ EbwMPC+d2Rt3dC5PzGsK35TtmBjGc6OPKwQpfEj8PAr7wXUNVTkvIYeHElzVgTt6SEeL jucQ== 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=K+96q/3v4nv+uCw8l4wMbDdxybsEghDjQ39WlnqLAmo=; b=dcmTUcL8WkoaNL7kcE2uG3z9vRH8XPxE7TDxftlsOWCdQJlkcg8Ywf7GB+zL6+RVm2 R/0pUdxhwdDAB7jotc4U+xoh2WHYfQTDL8mCFqCBDIIbZEQV90drbb+jn3o/VTXrF2qK FGAX3BmsGk3IH3wGL+h2pilJx/h0E3nZLIIKa5XG2ffYb03fAMU/vswimCmOdPUoG6c3 WjHvdHmOoxJf/6+SKnS/HJKx88wdbb2SbqCDoNcEak7ciH5UCQRpxiwrC+jwbbGf9/8I 9cf3v9SzUiea4IS87lx8J+HQQrrn9xgSUshseZUjC6XAdplRxSvHEjzCcXLDa0ARwj1o Z7RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cokXe9Rm; 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 u28si392959pgk.378.2019.09.23.19.50.19; Mon, 23 Sep 2019 19:50:20 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cokXe9Rm; 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 642397E721; Tue, 24 Sep 2019 02:49:44 +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 DA2117E26B for ; Tue, 24 Sep 2019 02:49:38 +0000 (UTC) Received: by mail-pf1-f194.google.com with SMTP id q10so296481pfl.0 for ; Mon, 23 Sep 2019 19:49:40 -0700 (PDT) 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=dQOskvLO4+Pm/JYq2/qiTkf+C0DW09nZSD+JVJDcubw=; b=cokXe9RmtJcTdIzS0+wlIYrg51NZsFu7o51qB4WehPP6Fv3r9QC7Wfvc1czwcRwSxC pHrK5xYgTR81R1Rn/ak9+FlqDx4sxQq7bLz//ND3mJkNjS05Ys6qrhDzsGljI+L+tumL uimfiEgGXbIa9ILmpexlP/+5Ijn9sHsQxt4dAXPAIKmG/tkvnapVzhXa4rJ8hYufX75l pFnWOHQvkoACKF5YYuwTu5L8Zve+hUKzDhKpmI+IRM8LLpGrE152JfMMSGuoA8gHiCLx IT2K16/dH1dbam7qjFaMF5a2ua0lFIjLIPc/VVru865rw+8MYyi8myGSr4sZXNOKseyx m8Yg== 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=dQOskvLO4+Pm/JYq2/qiTkf+C0DW09nZSD+JVJDcubw=; b=VmdCSxO0rhIQJq7XjspKZxnpSF1fp8pD6MmApYTQgvZxYe4Sp4s53SrHYYYO6+9RoS gHM/pw0t2UaMtQc1qIdizXoItlqeh6cmoQZl+jOubo/I1T1a2R3iDY2p5zKPfu5DMRcg LjlSUNtNHPt4hI6YQYmBlih1i0qW3fvY5WucRe/pXAuD5EI1j+cwUp/LMPB8XjTKBWZl FfF4nuKYd32jtmsHHCUyvMBuqNt1hNwoH13GxKQ04nHBWz2PmuJGCSsyWKNwZwd1sFLu vPP4Pr/yXNUZ1ZsXf+ddIA/JfTy+Pr+gsR+O3b3ppqYkCrf8CR74jCORD1VJqC+ZMOTR WkRQ== X-Gm-Message-State: APjAAAV7Z4IZ/Cf+FPHDr+1sHyqH5YCjShWa8lqIHyM4rwmBZVY7YGWd JgBf1bKffTeHyKocwjW4hgDzPGEzaYA= X-Received: by 2002:a63:2216:: with SMTP id i22mr783577pgi.430.1569293379857; Mon, 23 Sep 2019 19:49:39 -0700 (PDT) Received: from akuster-ThinkPad-T460s.mvista.com ([2601:202:4180:a5c0:ec07:55c0:9c8c:b3de]) by smtp.gmail.com with ESMTPSA id q204sm146791pfc.11.2019.09.23.19.49.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Sep 2019 19:49:39 -0700 (PDT) From: Armin Kuster To: openembedded-core@lists.openembedded.org Date: Mon, 23 Sep 2019 19:48:46 -0700 Message-Id: <027618ebbac58a05da0cfd27be113195341f3588.1569292053.git.akuster808@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Subject: [OE-core] [warrior][ 06/50] 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 Signed-off-by: Armin Kuster --- .../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.*)/$"