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 4A94B145331 for ; Tue, 21 May 2024 15:35:30 +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=1716305730; cv=none; b=exv3nmEsBPeLqQMN/v+fGG+ZdOtY3GKRP6qctuwMN7/MEupCn2dejopUqZkjtTK0ojq5Z6onR2RkK/Ewn7TP0JxBA6E5nJGTBX7pgMQ7UAqYlCXrUeb3QinqsyVorrH7+kZGXMQzEXLxN8xftzyv8+HSD2D8a6MtoTN7Sp2QVV0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716305730; c=relaxed/simple; bh=0+Xn9h4+ok0cH8hFQTBb4mtjqs6LBXXZ5J4i6OrGouk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=owN36laTqQyCd47+jIGSUhoZ05VRzdRWvlbcaMp8bJUtFqtgrp+vBAyqOjXFXcUQvR1m5kCUxEG1xhNdEk0O1DegmbcrzmHp6tfYRptGB/+j7AxX4Y8YeLoRt+REYmKTG6GrAMK9DnAa09Y73Lepu4bFOpX2YN4bFWc2PCrnpPo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2sf+h/as; 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="2sf+h/as" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C93B4C32786; Tue, 21 May 2024 15:35:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716305730; bh=0+Xn9h4+ok0cH8hFQTBb4mtjqs6LBXXZ5J4i6OrGouk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=2sf+h/assLOW7tQMVuEVBqYUbYALPhzoHHDDgMQ/3FZ6Okc6bKAdOjHc4TAf+t9Fk uSJbeN+nKyk2HLT4yukhMiHrDQTv9M3x0TECaSZVUvvyHqhd7LOn8ykk3Zywyj8t+Z 0EM8xh92LN6ycipygmveTIhDQ0werFLuRnDUmEGM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52787: blk-mq: make sure active queue usage is held for bio_integrity_prep() Date: Tue, 21 May 2024 17:31:23 +0200 Message-ID: <2024052155-CVE-2023-52787-67f0@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=2427; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0+Xn9h4+ok0cH8hFQTBb4mtjqs6LBXXZ5J4i6OrGouk=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk++/SXPonawJ00YcL9h0d/n5WZPOHBVzfDefUux4IEf /gHxa7d1RHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATSbVnWLD/2RLjivqWC1M+ pjpmxu9Oep61dTLDgtWNPXwTd9WlBQvyxkdH9297I3ZvJQA= 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: make sure active queue usage is held for bio_integrity_prep() blk_integrity_unregister() can come if queue usage counter isn't held for one bio with integrity prepared, so this request may be completed with calling profile->complete_fn, then kernel panic. Another constraint is that bio_integrity_prep() needs to be called before bio merge. Fix the issue by: - call bio_integrity_prep() with one queue usage counter grabbed reliably - call bio_integrity_prep() before bio merge The Linux kernel CVE team has assigned CVE-2023-52787 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit 900e08075202 and fixed in 6.1.72 with commit b5c8e0ff76d1 Issue introduced in 5.16 with commit 900e08075202 and fixed in 6.5.13 with commit e9c309ded295 Issue introduced in 5.16 with commit 900e08075202 and fixed in 6.6.3 with commit b80056bd75a1 Issue introduced in 5.16 with commit 900e08075202 and fixed in 6.7 with commit b0077e269f6c 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-2023-52787 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/b5c8e0ff76d10f6bf70a7237678f27c20cf59bc9 https://git.kernel.org/stable/c/e9c309ded295b7f8849097d71ae231456ca79f78 https://git.kernel.org/stable/c/b80056bd75a16e4550873ecefe12bc8fd190b1cf https://git.kernel.org/stable/c/b0077e269f6c152e807fdac90b58caf012cdbaab