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 38B9F3451A3 for ; Wed, 24 Dec 2025 13:09:49 +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=1766581789; cv=none; b=J50/itSEmAjnbmOCvWfLRUcJIhifgSwLSpQ368xhNpX6va/e6nnIxaBCGYCYFCyCeMufs8iNfXjudGa/r91lctZ7Mqr74h/V3HxdfkGyPEIwrus1R2F/MlQYPl07rgsLIo1XmCJgybQZH6IZCgH6I5ZP6yk/TW+ErFmy4G+RP8o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581789; c=relaxed/simple; bh=8LarufnPAPMEVhPsY98C/O8rvthF2TNsCAjkXjUwtxQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MaS93X4Cp9lK8RAIVxqsKyjz5wHB8rCO8UThox12MpBavW+kJBzHOeL1cJFDNWN6qsp5NHGMhvKKEwiGtFysLYjm0d2ogURIIGkbETAxaLNwgeiKlYp7kpLZ8qRMz6GL45BQ2DsMITotZv/9Weph7IoZprM5m87Z79Uut7MqLlE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dLGnNoV7; 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="dLGnNoV7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC435C4CEFB; Wed, 24 Dec 2025 13:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766581789; bh=8LarufnPAPMEVhPsY98C/O8rvthF2TNsCAjkXjUwtxQ=; h=From:To:Cc:Subject:Date:Reply-To:From; b=dLGnNoV79Q1vkdlVPgHrnJdRRaas+z+c9xUoJpUoEOfZ03gFca+QKGdx1H89ldZB2 gxZroy0yvmGcEY6TNmvKT6/jpWA8AnOrxvf4DrdkcBo7HTpORFpCIleVn2gAyy71bs 9FcSa5O3RqbGpOGULrQlQ9S2zjDjq8mmThUZAqYM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54107: blk-cgroup: dropping parent refcount after pd_free_fn() is done Date: Wed, 24 Dec 2025 14:07:04 +0100 Message-ID: <2025122412-CVE-2023-54107-12ef@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2169; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=PlXvB4v837gPM0IjAxaq7pEWOlq620TFcPbginAKhQo=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneT10SFu7L2DJnT2tcSBRzr+IUHYlYYc8ojXtVoo8c/ 3NsOXKiI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZivIRhJuMPjf7MjsjT547t q7rklmVbecjzB8N8f7+r934nR0zlqX23tIt/5951HaGfAQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: blk-cgroup: dropping parent refcount after pd_free_fn() is done Some cgroup policies will access parent pd through child pd even after pd_offline_fn() is done. If pd_free_fn() for parent is called before child, then UAF can be triggered. Hence it's better to guarantee the order of pd_free_fn(). Currently refcount of parent blkg is dropped in __blkg_release(), which is before pd_free_fn() is called in blkg_free_work_fn() while blkg_free_work_fn() is called asynchronously. This patch make sure pd_free_fn() called from removing cgroup is ordered by delaying dropping parent refcount after calling pd_free_fn() for child. BTW, pd_free_fn() will also be called from blkcg_deactivate_policy() from deleting device, and following patches will guarantee the order. The Linux kernel CVE team has assigned CVE-2023-54107 to this issue. Affected and fixed versions =========================== Fixed in 6.3 with commit c7241babf0855d8a6180cd1743ff0ec34de40b4e 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-54107 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 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/c7241babf0855d8a6180cd1743ff0ec34de40b4e