From mboxrd@z Thu Jan 1 00:00:00 1970 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 E72EE213E68 for ; Wed, 26 Feb 2025 02:13:37 +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=1740536018; cv=none; b=eyf4RROFnoY9FgvQQtms4Pv+IxMSjWQ+5/Npw7zI86GFO+u5OIRFAWgN84dVP1fEtBRbrFpY/wMx6hs9v48GXgp8HmdYQFZ/tY/ZAtXoW7IvRu9B7uVLOuufCN/nTRwJNuWutc6L9qBSLrc3s/n9i8+o8coJ/ttB7spfFPENdhA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536018; c=relaxed/simple; bh=nGbr9PxNRbx+ei0yaT5B+M8GeVBFeZNTXNjLy9lFAg8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZHnQsy5UOaMwDgXXaKuOM6YVC+TX0PVgfvDSB7JpVyAqwauQDQqUAWZd0gvuJKUapn9dyDjxloyb4tvQd1xeOpbJD2iYchtGxP0wipbpymeDgzkcDpJmqn26ebDPGzqQS65DFIq7CpF+h+YNXyo3gS3fB24LFKjcwlmZJT4QmCE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sBzhQghu; 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="sBzhQghu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBF0DC4CEDD; Wed, 26 Feb 2025 02:13:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536017; bh=nGbr9PxNRbx+ei0yaT5B+M8GeVBFeZNTXNjLy9lFAg8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=sBzhQghu6O3HL0wdeKB4wAzQwHxkE2XsBBw3GR6NNMgpAhxu8TsaNjTsFx0suqkkO ah9SJnfhJqG4z/JgWF6YsUJE6MxVcKLlidPQu+J02J2a6NP/zW6KPgubF339rvOLqz KNpfekAKZrlaAE3x72oU6klw1Ah6cGsTreYsryX0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49377: blk-mq: don't touch ->tagset in blk_mq_get_sq_hctx Date: Wed, 26 Feb 2025 03:10:51 +0100 Message-ID: <2025022647-CVE-2022-49377-4fdf@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=2654; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=nGbr9PxNRbx+ei0yaT5B+M8GeVBFeZNTXNjLy9lFAg8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yl8fv7Yn1mj+c6WeFSGZP3+uc/mQ+v7K1H/TquLDJ 4dwXXkb2xHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATKfnNsGCZrqNn0cUnPNan JDS9P/ap7C7+tY5hnm7tp8apk76XmRZ7amtd6Vv9fl27KgA= 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: blk-mq: don't touch ->tagset in blk_mq_get_sq_hctx blk_mq_run_hw_queues() could be run when there isn't queued request and after queue is cleaned up, at that time tagset is freed, because tagset lifetime is covered by driver, and often freed after blk_cleanup_queue() returns. So don't touch ->tagset for figuring out current default hctx by the mapping built in request queue, so use-after-free on tagset can be avoided. Meantime this way should be fast than retrieving mapping from tagset. The Linux kernel CVE team has assigned CVE-2022-49377 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit b6e68ee82585f2ee890b0a897a6aacbf49a467bb and fixed in 5.15.47 with commit 460aa288c5cd0544dcf933a2f0ad0e8c6d2d35ff Issue introduced in 5.12 with commit b6e68ee82585f2ee890b0a897a6aacbf49a467bb and fixed in 5.17.15 with commit b140bac470b4f707cda59c7266214246238661df Issue introduced in 5.12 with commit b6e68ee82585f2ee890b0a897a6aacbf49a467bb and fixed in 5.18.4 with commit 70fdd922c7bf8949f8df109cf2635dff64c90392 Issue introduced in 5.12 with commit b6e68ee82585f2ee890b0a897a6aacbf49a467bb and fixed in 5.19 with commit 5d05426e2d5fd7df8afc866b78c36b37b00188b7 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-49377 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: block/blk-mq.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/460aa288c5cd0544dcf933a2f0ad0e8c6d2d35ff https://git.kernel.org/stable/c/b140bac470b4f707cda59c7266214246238661df https://git.kernel.org/stable/c/70fdd922c7bf8949f8df109cf2635dff64c90392 https://git.kernel.org/stable/c/5d05426e2d5fd7df8afc866b78c36b37b00188b7