{"id":"CVE-2023-52668","state":"PUBLISHED","title":"btrfs: zoned: fix lock ordering in btrfs_zone_activate()","description":"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->lock){+.+.}-{2:2}, at: btrfs_zone_finish_one_bg+0x5e/0x130\n   but task is already holding lock:\n   ffff88810a23a318 (&fs_info->zone_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   -> #1 (&fs_info->zone_active_bgs_lock){+.+.}-{2:2}:\n   ...\n   -> #0 (&cache->lock){+.+.}-{2:2}:\n   ...\n\nThis is because we take fs_info->zone_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->zone_active_bgs_lock's critical\nsection and taking it before a block_group's lock.","publishedAt":"2024-05-17T14:01:52.768Z","updatedAt":"2026-05-11T19:31:21.860Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a7e1ac7bdc5af91af2d52e6269fdbd92fe9ee353","status":"affected","lessThan":"6f74989f5909cdec9b1274641f0fa306b15bb476","versionType":"git"},{"version":"a7e1ac7bdc5af91af2d52e6269fdbd92fe9ee353","status":"affected","lessThan":"1908e9d01e5395adff68d9d308a0fb15337e6272","versionType":"git"},{"version":"a7e1ac7bdc5af91af2d52e6269fdbd92fe9ee353","status":"affected","lessThan":"b18f3b60b35a8c01c9a2a0f0d6424c6d73971dc3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/zoned.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.15","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.3","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/zoned.c"]}],"references":["https://git.kernel.org/stable/c/6f74989f5909cdec9b1274641f0fa306b15bb476","https://git.kernel.org/stable/c/1908e9d01e5395adff68d9d308a0fb15337e6272","https://git.kernel.org/stable/c/b18f3b60b35a8c01c9a2a0f0d6424c6d73971dc3"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/52xxx/CVE-2023-52668.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-52668","state":"PUBLISHED","datePublished":"2024-05-17T14:01:52.768Z","dateUpdated":"2026-05-11T19:31:21.860Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-03-07T14:49:46.885Z"},"containers":{"cna":{"title":"btrfs: zoned: fix lock ordering in btrfs_zone_activate()","descriptions":[{"lang":"en","value":"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->lock){+.+.}-{2:2}, at: btrfs_zone_finish_one_bg+0x5e/0x130\n   but task is already holding lock:\n   ffff88810a23a318 (&fs_info->zone_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   -> #1 (&fs_info->zone_active_bgs_lock){+.+.}-{2:2}:\n   ...\n   -> #0 (&cache->lock){+.+.}-{2:2}:\n   ...\n\nThis is because we take fs_info->zone_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->zone_active_bgs_lock's critical\nsection and taking it before a block_group's lock."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a7e1ac7bdc5af91af2d52e6269fdbd92fe9ee353","status":"affected","lessThan":"6f74989f5909cdec9b1274641f0fa306b15bb476","versionType":"git"},{"version":"a7e1ac7bdc5af91af2d52e6269fdbd92fe9ee353","status":"affected","lessThan":"1908e9d01e5395adff68d9d308a0fb15337e6272","versionType":"git"},{"version":"a7e1ac7bdc5af91af2d52e6269fdbd92fe9ee353","status":"affected","lessThan":"b18f3b60b35a8c01c9a2a0f0d6424c6d73971dc3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/zoned.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.15","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.3","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/btrfs/zoned.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/6f74989f5909cdec9b1274641f0fa306b15bb476"},{"url":"https://git.kernel.org/stable/c/1908e9d01e5395adff68d9d308a0fb15337e6272"},{"url":"https://git.kernel.org/stable/c/b18f3b60b35a8c01c9a2a0f0d6424c6d73971dc3"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:31:21.860Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.6.15"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.7.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.8"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2023-52668","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-05-17T17:16:18.284069Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:23:54.895Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/6f74989f5909cdec9b1274641f0fa306b15bb476","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/1908e9d01e5395adff68d9d308a0fb15337e6272","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/b18f3b60b35a8c01c9a2a0f0d6424c6d73971dc3","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T23:11:34.555Z"}}]}}}