Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84E6512FB3C for ; Tue, 21 May 2024 14:23:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716301408; cv=none; b=nsaVCcEIFyLET988Pc9XdLEGi4AT2aZ8QZ0RzUIh4tEHUldUlsaTvfDT5r4Np84SfK9NfYYDRp9Ad40qxiLMk5kKGa6POGQYvYV4d9dqMIlwE5wUQ1Tp8+Tbfp9crfw0wSXSI3LDGf4LnjBzEYgzTWds3Q3nPYlSSVnyKWSNnvY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716301408; c=relaxed/simple; bh=LhCnqmkF4zWEywcjihrqJ+1AItnMPguC4ZyIcb+RQNk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SBwuQVK4Tbf+A4zzH3Yb8/JsCygaagL3cY4Um0HUEe0TuWkMTl/KECw2CVbtmLdltISJiyN3/0ITAfeq6+lUFR3XIGTrbThwkS6OqVk9kR1ghnH+pDfJnO4ZV34YV8TrB+QBj+MlCpZYLcfq3zrL3fT08CaHXepF9aYawk7hMEQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oCfdKixt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="oCfdKixt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9FA0C2BD11; Tue, 21 May 2024 14:23:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716301408; bh=LhCnqmkF4zWEywcjihrqJ+1AItnMPguC4ZyIcb+RQNk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=oCfdKixtPvAhG1z/tzpNp9S0sk+Umyjp6/MdTNYfCWPFM/BAOqL4KYUs2XmRGVF9+ Q7hzKBjWxTQmLWbF1jztRUJlV21yJD9GaBYmwHa9vz1xZ+omlj5ZTtnDrWEUqspi1E fC7SJc/LC+q/2UQefnKW3rkR5ekpqtSW6smamCrg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47278: bus: mhi: pci_generic: Fix possible use-after-free in mhi_pci_remove() Date: Tue, 21 May 2024 16:20:32 +0200 Message-ID: <2024052152-CVE-2021-47278-8b68@gregkh> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2054; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=LhCnqmkF4zWEywcjihrqJ+1AItnMPguC4ZyIcb+RQNk=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+azvFT8QLrI5qXP1K5+2sC/I8t2Yfb5p4sdPopNn0M HtB62U/O2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi0+8yzI86GynNklXb05+Q /vhiUkLP+79sxxjmuz25+YeXtS6sM8vt+ov8eW6H93tcBgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: bus: mhi: pci_generic: Fix possible use-after-free in mhi_pci_remove() This driver's remove path calls del_timer(). However, that function does not wait until the timer handler finishes. This means that the timer handler may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling del_timer_sync(), which makes sure the timer handler has finished, and unable to re-schedule itself. The Linux kernel CVE team has assigned CVE-2021-47278 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit 8562d4fe34a3 and fixed in 5.12.11 with commit c597d5c59c7a Issue introduced in 5.12 with commit 8562d4fe34a3 and fixed in 5.13 with commit 0b67808ade88 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2021-47278 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/bus/mhi/pci_generic.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/c597d5c59c7a6417dba06590f59b922e01188e8d https://git.kernel.org/stable/c/0b67808ade8893a1b3608ddd74fac7854786c919