{"id":"CVE-2023-52668","summary":"btrfs: zoned: fix lock ordering in btrfs_zone_activate()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: zoned: fix lock ordering in btrfs_zone_activate()\n\nThe btrfs CI reported a lockdep warning as follows by running generic\ngeneric/129.\n\n   WARNING: possible circular locking dependency detected\n   6.7.0-rc5+ #1 Not tainted\n   ------------------------------------------------------\n   kworker/u5:5/793427 is trying to acquire lock:\n   ffff88813256d028 (&cache-\u003elock){+.+.}-{2:2}, at: btrfs_zone_finish_one_bg+0x5e/0x130\n   but task is already holding lock:\n   ffff88810a23a318 (&fs_info-\u003ezone_active_bgs_lock){+.+.}-{2:2}, at: btrfs_zone_finish_one_bg+0x34/0x130\n   which lock already depends on the new lock.\n\n   the existing dependency chain (in reverse order) is:\n   -\u003e #1 (&fs_info-\u003ezone_active_bgs_lock){+.+.}-{2:2}:\n   ...\n   -\u003e #0 (&cache-\u003elock){+.+.}-{2:2}:\n   ...\n\nThis is because we take fs_info-\u003ezone_active_bgs_lock after a block_group's\nlock in btrfs_zone_activate() while doing the opposite in other places.\n\nFix the issue by expanding the fs_info-\u003ezone_active_bgs_lock's critical\nsection and taking it before a block_group's lock.","modified":"2026-04-11T12:46:34.300567Z","published":"2024-05-17T14:01:52.768Z","related":["SUSE-SU-2024:3194-1","SUSE-SU-2024:3195-1","SUSE-SU-2024:3383-1","SUSE-SU-2025:20044-1","SUSE-SU-2025:20047-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/52xxx/CVE-2023-52668.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/1908e9d01e5395adff68d9d308a0fb15337e6272"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6f74989f5909cdec9b1274641f0fa306b15bb476"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b18f3b60b35a8c01c9a2a0f0d6424c6d73971dc3"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/52xxx/CVE-2023-52668.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-52668"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"a7e1ac7bdc5af91af2d52e6269fdbd92fe9ee353"},{"fixed":"6f74989f5909cdec9b1274641f0fa306b15bb476"},{"fixed":"1908e9d01e5395adff68d9d308a0fb15337e6272"},{"fixed":"b18f3b60b35a8c01c9a2a0f0d6424c6d73971dc3"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-52668.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.6.0"},{"fixed":"6.6.15"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.7.3"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-52668.json"}}],"schema_version":"1.7.5"}