{"id":"CVE-2023-52668","aliases":["CVE-2023-52668"],"related":[],"kind":"vulnerability","state":"published","title":"btrfs: zoned: fix lock ordering in btrfs_zone_activate()","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: btrfs:zoned: corrige el orden de bloqueo en btrfs_zone_activate() El CI de btrfs informó una advertencia de bloqueo de la siguiente manera al ejecutar generic generic/129. ADVERTENCIA: se detectó posible dependencia de bloqueo circular 6.7.0-rc5+ #1 No contaminado ---------------------------------- -------------------- kworker/u5:5/793427 está intentando adquirir el bloqueo: ffff88813256d028 (&amp;cache-&gt;lock){+.+.}-{2: 2}, en: btrfs_zone_finish_one_bg+0x5e/0x130 pero la tarea ya mantiene el bloqueo: ffff88810a23a318 (&amp;fs_info-&gt;zone_active_bgs_lock){+.+.}-{2:2}, en: btrfs_zone_finish_one_bg+0x34/0x130 cuyo bloqueo ya depende del cerradura nueva. la cadena de dependencia existente (en orden inverso) es: -&gt; #1 (&amp;fs_info-&gt;zone_active_bgs_lock){+.+.}-{2:2}: ... -&gt; #0 (&amp;cache-&gt;lock){+. +.}-{2:2}: ... Esto se debe a que tomamos fs_info-&gt;zone_active_bgs_lock después del bloqueo de un block_group en btrfs_zone_activate() mientras hacemos lo contrario en otros lugares. Solucione el problema expandiendo la sección crítica de fs_info-&gt;zone_active_bgs_lock y llevándola antes del bloqueo de block_group.","source":"nvd"}],"published":"2024-05-17T14:01:52.768Z","modified":"2026-06-17T06:43:17.770Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"a7e1ac7bdc5af91af2d52e6269fdbd92fe9ee353","fixed":"6f74989f5909cdec9b1274641f0fa306b15bb476","status":"affected"},{"type":"git","introduced":"a7e1ac7bdc5af91af2d52e6269fdbd92fe9ee353","fixed":"1908e9d01e5395adff68d9d308a0fb15337e6272","status":"affected"},{"type":"git","introduced":"a7e1ac7bdc5af91af2d52e6269fdbd92fe9ee353","fixed":"b18f3b60b35a8c01c9a2a0f0d6424c6d73971dc3","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.6","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.6","status":"unaffected"},{"type":"semver","introduced":"6.6.15","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.7.3","lastAffected":"6.7.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.8","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.6","fixed":"6.6.15"},{"status":"affected","introduced":"6.7","fixed":"6.7.3"},{"status":"affected","version":"6.8"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/6f74989f5909cdec9b1274641f0fa306b15bb476","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1908e9d01e5395adff68d9d308a0fb15337e6272","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b18f3b60b35a8c01c9a2a0f0d6424c6d73971dc3","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-05-17T17:16:18.284Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-52668","url":"https://www.cve.org/CVERecord?id=CVE-2023-52668","licence":"CVE Terms of Use","modified":"2026-05-11T19:31:21.860Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-52668","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-52668","licence":"Public domain","modified":"2026-06-17T06:43:17.770Z"}],"updatedAt":"2026-11-25T22:58:33.963Z","epss":{"score":0.00176,"percentile":0.07413,"date":"2026-12-01T12:00:22.000Z"}}