Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web08.2678.1620182277277667806 for ; Tue, 04 May 2021 19:37:58 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: anuj.mittal@intel.com) IronPort-SDR: IGJSNm/4Rs+sJQl8GoonpwUFhzRN3Lrx4/6brCU/XB6aIT8/o0AjpRNdejm8PGn8eO3JlANlVp g+It2jSYejJg== X-IronPort-AV: E=McAfee;i="6200,9189,9974"; a="259400547" X-IronPort-AV: E=Sophos;i="5.82,273,1613462400"; d="scan'208";a="259400547" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2021 19:37:56 -0700 IronPort-SDR: y64mt4xm1A0XeKD9L9K03qVDAQ+2GzYr9Zs5bGmD5qtY3D8NlPi9Diyu9VrOe5+JFnM3uRVRy6 pL65Z8GcgCYQ== X-IronPort-AV: E=Sophos;i="5.82,273,1613462400"; d="scan'208";a="433586182" Received: from teohzhiq-mobl.gar.corp.intel.com (HELO anmitta2-mobl1.gar.corp.intel.com) ([10.213.150.148]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2021 19:37:54 -0700 From: "Anuj Mittal" To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 1/2] Revert "qemu: fix CVE-2021-3392" Date: Wed, 5 May 2021 10:37:43 +0800 Message-Id: <20210505023744.343484-1-anuj.mittal@intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This reverts commit 5e8e08df8b5d0040ad911d3c51f63e7fec1858b4. This is an incomplete fix. Signed-off-by: Anuj Mittal --- meta/recipes-devtools/qemu/qemu.inc | 1 - .../qemu/qemu/CVE-2021-3392.patch | 45 ------------------- 2 files changed, 46 deletions(-) delete mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2021-3392.patch diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 486f404668..810d8b7c8a 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc @@ -54,7 +54,6 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2021-3416_9.patch \ file://CVE-2021-3416_10.patch \ file://CVE-2021-20257.patch \ - file://CVE-2021-3392.patch \ file://CVE-2020-27821.patch \ file://CVE-2021-20263.patch \ " diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2021-3392.patch b/meta/recipes-devtools/qemu/qemu/CVE-2021-3392.patch deleted file mode 100644 index 1c688827db..0000000000 --- a/meta/recipes-devtools/qemu/qemu/CVE-2021-3392.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 3431b01b43584de5f710c40605fe3251f81c0e11 Mon Sep 17 00:00:00 2001 -From: Minjae Kim -Date: Tue, 27 Apr 2021 02:09:49 +0000 -Subject: [PATCH] scsi: mptsas: dequeue request object in case of an error - (CVE-2021-3392) - -From: Prasad J Pandit - -While processing SCSI i/o requests in mptsas_process_scsi_io_request(), -the Megaraid emulator appends new MPTSASRequest object 'req' to -the 's->pending' queue. In case of an error, this same object gets -dequeued in mptsas_free_request() only if SCSIRequest object -'req->sreq' is initialised. This may lead to a use-after-free issue. -Unconditionally dequeue 'req' object from 's->pending' to avoid it. - -Fixes: CVE-2021-3392 -Buglink: https://bugs.launchpad.net/qemu/+bug/1914236 -Reported-by: Cheolwoo Myung -Signed-off-by: Prasad J Pandit - -Upstream-Status: Acepted -[https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg00488.html] -CVE: CVE-2021-3392 -Signed-off-by: Minjae Kim ---- - hw/scsi/mptsas.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c -index f86616544..adff5b0bf 100644 ---- a/hw/scsi/mptsas.c -+++ b/hw/scsi/mptsas.c -@@ -257,8 +257,8 @@ static void mptsas_free_request(MPTSASRequest *req) - req->sreq->hba_private = NULL; - scsi_req_unref(req->sreq); - req->sreq = NULL; -- QTAILQ_REMOVE(&s->pending, req, next); - } -+ QTAILQ_REMOVE(&s->pending, req, next); - qemu_sglist_destroy(&req->qsg); - g_free(req); - } --- -2.17.1 - -- 2.30.2