{"id":"CVE-2025-68262","aliases":["CVE-2025-68262"],"related":[],"kind":"vulnerability","state":"published","title":"crypto: zstd - fix double-free in per-CPU stream cleanup","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: zstd - fix double-free in per-CPU stream cleanup\n\nThe crypto/zstd module has a double-free bug that occurs when multiple\ntfms are allocated and freed.\n\nThe issue happens because zstd_streams (per-CPU contexts) are freed in\nzstd_exit() during every tfm destruction, rather than being managed at\nthe module level.  When multiple tfms exist, each tfm exit attempts to\nfree the same shared per-CPU streams, resulting in a double-free.\n\nThis leads to a stack trace similar to:\n\n  BUG: Bad page state in process kworker/u16:1  pfn:106fd93\n  page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106fd93\n  flags: 0x17ffffc0000000(node=0|zone=2|lastcpupid=0x1fffff)\n  page_type: 0xffffffff()\n  raw: 0017ffffc0000000 dead000000000100 dead000000000122 0000000000000000\n  raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000\n  page dumped because: nonzero entire_mapcount\n  Modules linked in: ...\n  CPU: 3 UID: 0 PID: 2506 Comm: kworker/u16:1 Kdump: loaded Tainted: G    B\n  Hardware name: ...\n  Workqueue: btrfs-delalloc btrfs_work_helper\n  Call Trace:\n   <TASK>\n   dump_stack_lvl+0x5d/0x80\n   bad_page+0x71/0xd0\n   free_unref_page_prepare+0x24e/0x490\n   free_unref_page+0x60/0x170\n   crypto_acomp_free_streams+0x5d/0xc0\n   crypto_acomp_exit_tfm+0x23/0x50\n   crypto_destroy_tfm+0x60/0xc0\n   ...\n\nChange the lifecycle management of zstd_streams to free the streams only\nonce during module cleanup.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: zstd - fix double-free in per-CPU stream cleanup\n\nThe crypto/zstd module has a double-free bug that occurs when multiple\ntfms are allocated and freed.\n\nThe issue happens because zstd_streams (per-CPU contexts) are freed in\nzstd_exit() during every tfm destruction, rather than being managed at\nthe module level.  When multiple tfms exist, each tfm exit attempts to\nfree the same shared per-CPU streams, resulting in a double-free.\n\nThis leads to a stack trace similar to:\n\n  BUG: Bad page state in process kworker/u16:1  pfn:106fd93\n  page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106fd93\n  flags: 0x17ffffc0000000(node=0|zone=2|lastcpupid=0x1fffff)\n  page_type: 0xffffffff()\n  raw: 0017ffffc0000000 dead000000000100 dead000000000122 0000000000000000\n  raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000\n  page dumped because: nonzero entire_mapcount\n  Modules linked in: ...\n  CPU: 3 UID: 0 PID: 2506 Comm: kworker/u16:1 Kdump: loaded Tainted: G    B\n  Hardware name: ...\n  Workqueue: btrfs-delalloc btrfs_work_helper\n  Call Trace:\n   <TASK>\n   dump_stack_lvl+0x5d/0x80\n   bad_page+0x71/0xd0\n   free_unref_page_prepare+0x24e/0x490\n   free_unref_page+0x60/0x170\n   crypto_acomp_free_streams+0x5d/0xc0\n   crypto_acomp_exit_tfm+0x23/0x50\n   crypto_destroy_tfm+0x60/0xc0\n   ...\n\nChange the lifecycle management of zstd_streams to free the streams only\nonce during module cleanup.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ncrypto: zstd - corrección de doble liberación en la limpieza de flujos por CPU\n\nEl módulo crypto/zstd tiene un error de doble liberación que ocurre cuando se asignan y liberan múltiples tfms.\n\nEl problema ocurre porque los zstd_streams (contextos por CPU) se liberan en zstd_exit() durante cada destrucción de tfm, en lugar de ser gestionados a nivel de módulo. Cuando existen múltiples tfms, cada salida de tfm intenta liberar los mismos flujos compartidos por CPU, lo que resulta en una doble liberación.\n\nEsto conduce a un seguimiento de pila similar a:\n\n  BUG: Estado de página incorrecto en el proceso kworker/u16:1 pfn:106fd93\n  página: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106fd93\n  flags: 0x17ffffc0000000(node=0|zone=2|lastcpupid=0x1fffff)\n  page_type: 0xffffffff()\n  raw: 0017ffffc0000000 dead000000000100 dead000000000122 0000000000000000\n  raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000\n  página volcada porque: entire_mapcount distinto de cero\n  Módulos enlazados: ...\n  CPU: 3 UID: 0 PID: 2506 Comm: kworker/u16:1 Kdump: loaded Tainted: G    B\n  Nombre del hardware: ...\n  Cola de trabajo: btrfs-delalloc btrfs_work_helper\n  Traza de llamada:\n   <TAREA>\n   dump_stack_lvl+0x5d/0x80\n   bad_page+0x71/0xd0\n   free_unref_page_prepare+0x24e/0x490\n   free_unref_page+0x60/0x170\n   crypto_acomp_free_streams+0x5d/0xc0\n   crypto_acomp_exit_tfm+0x23/0x50\n   crypto_destroy_tfm+0x60/0xc0\n   ...\n\nCambiar la gestión del ciclo de vida de zstd_streams para liberar los flujos solo una vez durante la limpieza del módulo.","source":"nvd"}],"published":"2025-12-16T14:45:04.198Z","modified":"2026-10-14T13:10:00.187Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"f5ad93ffb54119a8dc5e18f070624d4ead586969","fixed":"dc0f4509b0ed5d82bef78e058db0ac4df04d0695","status":"affected"},{"type":"git","introduced":"f5ad93ffb54119a8dc5e18f070624d4ead586969","fixed":"e983feaa79de1e46c9087fb9f02fedb0e5397ce6","status":"affected"},{"type":"git","introduced":"f5ad93ffb54119a8dc5e18f070624d4ead586969","fixed":"48bc9da3c97c15f1ea24934bcb3b736acd30163d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.17","status":"unaffected"},{"type":"semver","introduced":"6.17.12","lastAffected":"6.17.*","status":"unaffected"},{"type":"semver","introduced":"6.18.1","lastAffected":"6.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.19","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/dc0f4509b0ed5d82bef78e058db0ac4df04d0695","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e983feaa79de1e46c9087fb9f02fedb0e5397ce6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/48bc9da3c97c15f1ea24934bcb3b736acd30163d","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68262","url":"https://www.cve.org/CVERecord?id=CVE-2025-68262","licence":"CVE Terms of Use","modified":"2026-05-11T21:49:58.343Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68262","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68262","licence":"Public domain","modified":"2026-10-14T13:10:00.187Z"}],"updatedAt":"2026-11-25T22:59:09.518Z","epss":{"score":0.00197,"percentile":0.09869,"date":"2026-12-02T12:00:21.000Z"}}