{"id":"CVE-2025-37856","aliases":["CVE-2025-37856"],"related":[],"kind":"vulnerability","state":"published","title":"btrfs: harden block_group::bg_list against list_del() races","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: harden block_group::bg_list against list_del() races\n\nAs far as I can tell, these calls of list_del_init() on bg_list cannot\nrun concurrently with btrfs_mark_bg_unused() or btrfs_mark_bg_to_reclaim(),\nas they are in transaction error paths and situations where the block\ngroup is readonly.\n\nHowever, if there is any chance at all of racing with mark_bg_unused(),\nor a different future user of bg_list, better to be safe than sorry.\n\nOtherwise we risk the following interleaving (bg_list refcount in parens)\n\nT1 (some random op)                       T2 (btrfs_mark_bg_unused)\n                                        !list_empty(&bg->bg_list); (1)\nlist_del_init(&bg->bg_list); (1)\n                                        list_move_tail (1)\nbtrfs_put_block_group (0)\n                                        btrfs_delete_unused_bgs\n                                             bg = list_first_entry\n                                             list_del_init(&bg->bg_list);\n                                             btrfs_put_block_group(bg); (-1)\n\nUltimately, this results in a broken ref count that hits zero one deref\nearly and the real final deref underflows the refcount, resulting in a WARNING.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: harden block_group::bg_list against list_del() races\n\nAs far as I can tell, these calls of list_del_init() on bg_list cannot\nrun concurrently with btrfs_mark_bg_unused() or btrfs_mark_bg_to_reclaim(),\nas they are in transaction error paths and situations where the block\ngroup is readonly.\n\nHowever, if there is any chance at all of racing with mark_bg_unused(),\nor a different future user of bg_list, better to be safe than sorry.\n\nOtherwise we risk the following interleaving (bg_list refcount in parens)\n\nT1 (some random op)                       T2 (btrfs_mark_bg_unused)\n                                        !list_empty(&bg->bg_list); (1)\nlist_del_init(&bg->bg_list); (1)\n                                        list_move_tail (1)\nbtrfs_put_block_group (0)\n                                        btrfs_delete_unused_bgs\n                                             bg = list_first_entry\n                                             list_del_init(&bg->bg_list);\n                                             btrfs_put_block_group(bg); (-1)\n\nUltimately, this results in a broken ref count that hits zero one deref\nearly and the real final deref underflows the refcount, resulting in a WARNING.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: btrfs: endurecer block_group::bg_list contra ejecuciones list_del() Hasta donde puedo decir, estas llamadas de list_del_init() en bg_list no se pueden ejecutar simultáneamente con btrfs_mark_bg_unused() o btrfs_mark_bg_to_reclaim(), ya que están en rutas de error de transacción y situaciones en las que el grupo de bloques es de solo lectura. Sin embargo, si hay alguna posibilidad de competir con mark_bg_unused(), o con un futuro usuario diferente de bg_list, más vale prevenir que curar. De lo contrario, nos arriesgamos al siguiente intercalado (bg_list refcount entre paréntesis) T1 (alguna operación aleatoria) T2 (btrfs_mark_bg_unused) !list_empty(&amp;bg-&gt;bg_list); (1) list_del_init(&amp;bg-&gt;bg_list); (1) list_move_tail (1) btrfs_put_block_group (0) btrfs_delete_unused_bgs bg = list_first_entry list_del_init(&amp;bg-&gt;bg_list); btrfs_put_block_group(bg); (-1) En última instancia, esto da como resultado un recuento de referencias roto que llega a cero un deref antes y el deref final real desborda el recuento de referencias, lo que genera una ADVERTENCIA.","source":"nvd"}],"published":"2025-05-09T06:42:04.315Z","modified":"2026-10-30T13:17:58.327Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"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":[],"affected":[{"ranges":[{"type":"git","introduced":"01eca70ef8cf499d0cb6d1bbd691558e7792cf17","fixed":"ccb20413e7c82e4429c81f10d0e36cd9c0c643cd","status":"affected"},{"type":"git","introduced":"a9f189716cf15913c453299d72f69c51a9b0f86b","fixed":"9039afe6240ae01d6caf2fa731590ac74fb8a69b","status":"affected"},{"type":"git","introduced":"a9f189716cf15913c453299d72f69c51a9b0f86b","fixed":"bf089c4d1141b27332c092b1dcca5022c415a3b6","status":"affected"},{"type":"git","introduced":"a9f189716cf15913c453299d72f69c51a9b0f86b","fixed":"909e60fb469d4101c6b08cf6e622efb062bb24a1","status":"affected"},{"type":"git","introduced":"a9f189716cf15913c453299d72f69c51a9b0f86b","fixed":"185fd73e5ac06027c4be9a129e59193f6a3ef202","status":"affected"},{"type":"git","introduced":"a9f189716cf15913c453299d72f69c51a9b0f86b","fixed":"7511e29cf1355b2c47d0effb39e463119913e2f6","status":"affected"},{"type":"git","version":"edf3b5aadb2515c808200b904baa5b70a727f0ac","status":"affected"},{"type":"git","version":"5d19abcffd8404078dfa7d7118cec357b5e7bc58","status":"affected"},{"type":"semver","introduced":"6.1.47","fixed":"6.1.191","status":"affected"},{"type":"semver","introduced":"5.15.128","fixed":"5.16","status":"affected"},{"type":"semver","introduced":"6.4.12","fixed":"6.5","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.5","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.5","status":"unaffected"},{"type":"semver","introduced":"6.1.191","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.160","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.24","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.13.12","lastAffected":"6.13.*","status":"unaffected"},{"type":"semver","introduced":"6.14.3","lastAffected":"6.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.15","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","fixed":"6.12.24"},{"status":"affected","introduced":"6.13","fixed":"6.13.12"},{"status":"affected","introduced":"6.14","fixed":"6.14.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/ccb20413e7c82e4429c81f10d0e36cd9c0c643cd","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9039afe6240ae01d6caf2fa731590ac74fb8a69b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bf089c4d1141b27332c092b1dcca5022c415a3b6","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/909e60fb469d4101c6b08cf6e622efb062bb24a1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/185fd73e5ac06027c4be9a129e59193f6a3ef202","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7511e29cf1355b2c47d0effb39e463119913e2f6","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-37856","url":"https://www.cve.org/CVERecord?id=CVE-2025-37856","licence":"CVE Terms of Use","modified":"2026-10-30T12:21:24.224Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-37856","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-37856","licence":"Public domain","modified":"2026-10-30T13:17:58.327Z"}],"updatedAt":"2026-11-25T22:58:57.849Z","epss":{"score":0.0031,"percentile":0.25675,"date":"2026-12-01T12:00:22.000Z"}}