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 A6B5B2E611B for ; Wed, 1 Oct 2025 11:58:31 +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=1759319911; cv=none; b=AEzoUBzzG99gqm8AT9jhh39aziGxsQ3UDGaVRNimPpDXnFH17268O46wlTLtwAm8BxoZDvYe4E8gSYiBzzer2PW71CyiNSsuphP4kAAqw8196/5jd47cxsDrU15kaJMddqm/GV/IEvJDu5GqB09kYbOvfC7HQGIbR8BIcLWeFdQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759319911; c=relaxed/simple; bh=yzUUJ3cMpSfW/cTSAGnMobhjpt3V2UD3/t1glbkUPJI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ibAjzZ80mfYGJHoEFyuyfbd+PB3a9+2gmlgFEHYDpRTpny7wmOwnB4XuPisgXmaFrtlic2xp3PggPstQLqujizGgntefjxwau1zTIaIIpdAQRO56N9gqZREBkggsEAE1qP6/r2+A0783vylcTC9G66ttuvDYz0uSgZZ7keh7Zqk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KDbg5nNq; 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="KDbg5nNq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 157D1C4CEF4; Wed, 1 Oct 2025 11:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759319911; bh=yzUUJ3cMpSfW/cTSAGnMobhjpt3V2UD3/t1glbkUPJI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KDbg5nNqnvKsL8rN/bS+X/ibNkZ3uGyqW4zjmJwW7r7cqMG6nJmeQBFaUea5oN3do 4gNGSqlB/Ludd1BrDuODtRJnEoGpDo4ZyLh+/ba0WLiN2Frk2Fajr8JfsRcvkD7Hpw 1CuMpZEtQsfpL93SxLyKZErh1eZA3UcDiDtVhDAc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53522: cgroup,freezer: hold cpu_hotplug_lock before freezer_mutex Date: Wed, 1 Oct 2025 13:46:14 +0200 Message-ID: <2025100133-CVE-2023-53522-4e19@gregkh> X-Mailer: git-send-email 2.51.0 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=3613; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9kO70wmt0FI0n+i/kgvR474eHa3CNJDXDVI+xPWpf1Y=; b=owGbwMvMwCRo6H6F97bub03G02pJDBl3ReIcfsTetysWX1s6e/2sZ2Gy25Z94tuZedVU5dE9z reLLzWv64hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJlMoxLDix4XMXT8rDLY6z mFQPzV3qvcHMxplhnvIHzX3NYsdOVamnzNCXzpM4HiGUAwA= 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: cgroup,freezer: hold cpu_hotplug_lock before freezer_mutex syzbot is reporting circular locking dependency between cpu_hotplug_lock and freezer_mutex, for commit f5d39b020809 ("freezer,sched: Rewrite core freezer logic") replaced atomic_inc() in freezer_apply_state() with static_branch_inc() which holds cpu_hotplug_lock. cpu_hotplug_lock => cgroup_threadgroup_rwsem => freezer_mutex cgroup_file_write() { cgroup_procs_write() { __cgroup_procs_write() { cgroup_procs_write_start() { cgroup_attach_lock() { cpus_read_lock() { percpu_down_read(&cpu_hotplug_lock); } percpu_down_write(&cgroup_threadgroup_rwsem); } } cgroup_attach_task() { cgroup_migrate() { cgroup_migrate_execute() { freezer_attach() { mutex_lock(&freezer_mutex); (...snipped...) } } } } (...snipped...) } } } freezer_mutex => cpu_hotplug_lock cgroup_file_write() { freezer_write() { freezer_change_state() { mutex_lock(&freezer_mutex); freezer_apply_state() { static_branch_inc(&freezer_active) { static_key_slow_inc() { cpus_read_lock(); static_key_slow_inc_cpuslocked(); cpus_read_unlock(); } } } mutex_unlock(&freezer_mutex); } } } Swap locking order by moving cpus_read_lock() in freezer_apply_state() to before mutex_lock(&freezer_mutex) in freezer_change_state(). The Linux kernel CVE team has assigned CVE-2023-53522 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1 with commit f5d39b020809146cc28e6e73369bf8065e0310aa and fixed in 6.1.25 with commit 3756171b97c307d9df8b8ded1d883eec30172085 Issue introduced in 6.1 with commit f5d39b020809146cc28e6e73369bf8065e0310aa and fixed in 6.2.12 with commit 34fbb7b45bae20b551dda24337c7761ca13ce69d Issue introduced in 6.1 with commit f5d39b020809146cc28e6e73369bf8065e0310aa and fixed in 6.3 with commit 57dcd64c7e036299ef526b400a8d12b8a2352f26 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-53522 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: kernel/cgroup/legacy_freezer.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/3756171b97c307d9df8b8ded1d883eec30172085 https://git.kernel.org/stable/c/34fbb7b45bae20b551dda24337c7761ca13ce69d https://git.kernel.org/stable/c/57dcd64c7e036299ef526b400a8d12b8a2352f26