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 ADD4322EF5 for ; Mon, 20 May 2024 09:43:19 +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=1716198199; cv=none; b=jGzDszEYHWLi05HsNulVPUuR9XbuTT1nzuXnkxXCM7n7I9/CJcfviVeQt2zNLonnL0PeYF4NKisW2+dP4xfDAk7k+N2XdZwoAZQpCgoysps4cjge/GQ5Gtn7h5WWku0OzrtEP/a969Au3wqLdgQMzmHC0nazIq6rmxgM7/lpSBg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716198199; c=relaxed/simple; bh=cl0covRutTUmwi8Fie6h/vu3L4d4OuYi7ankuAYbBNc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YqZQvZXGJ+866QL1lYspac64vtU2FtB5NnNDhP9CApEsZTjC6lOu4+8k/yw7o308ZrG0zTD0xO1xjo7NyPzMIMX4b4MH8Ad6/Uw3YLcANa5Rk839Piahu2JoTp7dU5BoEL/+FYg0N++oTuVh0quK9dS1BStqft0SEhOkOb/cB3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0Rgx/yzc; 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="0Rgx/yzc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 342DEC4AF07; Mon, 20 May 2024 09:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716198199; bh=cl0covRutTUmwi8Fie6h/vu3L4d4OuYi7ankuAYbBNc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=0Rgx/yzcHLQA69/oj/DIo1e+JwUIwyS1HcKCpWXovOTMCabtaUuaQ4n4ws2KRAaL2 4nW6rvJ9v80HP6KBE0Or+gw+KizZL9hEaLyhcVKiJtnOywTTGzvnCyARLcOKnQP1/I UjE55wXaNKNmcsrOGkwc/HnyCTanQMM5tvsqOJCE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-35974: block: fix q->blkg_list corruption during disk rebind Date: Mon, 20 May 2024 11:42:39 +0200 Message-ID: <2024052024-CVE-2024-35974-7008@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=2470; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=cl0covRutTUmwi8Fie6h/vu3L4d4OuYi7ankuAYbBNc=; b=owGbwMvMwCRo6H6F97bub03G02pJDGne0gyFE+01/9b/aW3wL7Bryr23Ru2u/O6j/mdrj1r5q 1Zm3mDpiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgInsMGWYH1cRMS3j/urQlVEd nv0nug5wPf+9nmGuuN2trWbfTi1V/+KQ221W9NStZcVzAA== 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: block: fix q->blkg_list corruption during disk rebind Multiple gendisk instances can allocated/added for single request queue in case of disk rebind. blkg may still stay in q->blkg_list when calling blkcg_init_disk() for rebind, then q->blkg_list becomes corrupted. Fix the list corruption issue by: - add blkg_init_queue() to initialize q->blkg_list & q->blkcg_mutex only - move calling blkg_init_queue() into blk_alloc_queue() The list corruption should be started since commit f1c006f1c685 ("blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy()") which delays removing blkg from q->blkg_list into blkg_free_workfn(). The Linux kernel CVE team has assigned CVE-2024-35974 to this issue. Affected and fixed versions =========================== Issue introduced in 5.18 with commit 1059699f87eb and fixed in 6.6.28 with commit 740ffad95ca8 Issue introduced in 5.18 with commit 1059699f87eb and fixed in 6.8.7 with commit 858c489d81d6 Issue introduced in 5.18 with commit 1059699f87eb and fixed in 6.9 with commit 8b8ace080319 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-2024-35974 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-cgroup.c block/blk-cgroup.h block/blk-core.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/740ffad95ca8033bd6e080ed337655b13b4d38ac https://git.kernel.org/stable/c/858c489d81d659af17a4d11cfaad2afb42e47a76 https://git.kernel.org/stable/c/8b8ace080319a866f5dfe9da8e665ae51d971c54