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 ED57521ADCE for ; Wed, 26 Feb 2025 02:27:45 +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=1740536866; cv=none; b=L4fdFrJfWe4g5p8OVWV6GeMbHi8D7Hob9tAbmYRh3GG1DxP8qmvS0oTj5PZHduzh2bz9n9N7rC+PWt/8GM7osXov9QAUVdDaf3i5HAYZZ0azgyHgtfPKTg8mR9qP1+IrEB9GVruL/VqSJbB1BfCVlkXI2jd/DoivwhpN+QmGisQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536866; c=relaxed/simple; bh=Zf4SOEi4L39NJ6sbPORchZxnroke87NhNweIuo+n88c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TyqbFcUE/bTrRzisFnWAbk6CAJjq/EK5mx6xrvj+Sa2AjdQ7noqdiLfCI9UC0ZJpdQUzLvlIfKw1Vh5WV7+Bp2NyR4YwhScly8LlVM1n86Vhbe+g/gMwEEFLJhs6JDsv5PvTevBqemht604+HdeltJAgotEyYapT6bGBODF91UQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=J9pfrXB/; 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="J9pfrXB/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9134C4CEDD; Wed, 26 Feb 2025 02:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536865; bh=Zf4SOEi4L39NJ6sbPORchZxnroke87NhNweIuo+n88c=; h=From:To:Cc:Subject:Date:Reply-to:From; b=J9pfrXB/InHn1KOVqldQsILVnjMfMWHqKEByx0B7amhOfydVbnbfTHRmhQk4+NP4b taQJsmb7bEErOwQI5lGuDfaRDupkkSRxDPaR61pkvSd1Vle+Eh15iKpVSjUfQYl557 P0Hc/Afh96Co0Uc4X7mmRs8arYB8BcW9LzfnWFHA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49711: bus: fsl-mc-bus: fix KASAN use-after-free in fsl_mc_bus_remove() Date: Wed, 26 Feb 2025 03:24:34 +0100 Message-ID: <2025022631-CVE-2022-49711-3cab@gregkh> X-Mailer: git-send-email 2.48.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=2439; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Zf4SOEi4L39NJ6sbPORchZxnroke87NhNweIuo+n88c=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7qp43bfi/8bLPnhOrwxYuDto9fyY7z6l9P6TvSR+ed L9hRtB6nY5YFgZBJgZZMUWWL9t4ju6vOKToZWh7GmYOKxPIEAYuTgGYSGEAw4Ith7wquidm9857 8OvTftYF73Y7bcxnWLDdavud9wfLd7ea/L9wq+BfW9Rf60kA 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: fsl-mc-bus: fix KASAN use-after-free in fsl_mc_bus_remove() In fsl_mc_bus_remove(), mc->root_mc_bus_dev->mc_io is passed to fsl_destroy_mc_io(). However, mc->root_mc_bus_dev is already freed in fsl_mc_device_remove(). Then reference to mc->root_mc_bus_dev->mc_io triggers KASAN use-after-free. To avoid the use-after-free, keep the reference to mc->root_mc_bus_dev->mc_io in a local variable and pass to fsl_destroy_mc_io(). This patch needs rework to apply to kernels older than v5.15. The Linux kernel CVE team has assigned CVE-2022-49711 to this issue. Affected and fixed versions =========================== Issue introduced in 4.8 with commit f93627146f0e371093966ed3d44c065aa077cfb1 and fixed in 5.15.49 with commit ccd1751092341ac120a961835211f9f2e3735963 Issue introduced in 4.8 with commit f93627146f0e371093966ed3d44c065aa077cfb1 and fixed in 5.18.6 with commit 161b68b0a728377aaa10a8e14c70e7734f3c9ff7 Issue introduced in 4.8 with commit f93627146f0e371093966ed3d44c065aa077cfb1 and fixed in 5.19 with commit 928ea98252ad75118950941683893cf904541da9 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-2022-49711 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/fsl-mc/fsl-mc-bus.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/ccd1751092341ac120a961835211f9f2e3735963 https://git.kernel.org/stable/c/161b68b0a728377aaa10a8e14c70e7734f3c9ff7 https://git.kernel.org/stable/c/928ea98252ad75118950941683893cf904541da9