CVE-2025-68262

Source
https://cve.org/CVERecord?id=CVE-2025-68262
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68262.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-68262
Downstream
Related
Published
2025-12-16T14:45:04.198Z
Modified
2026-03-08T15:58:57.381254Z
Summary
crypto: zstd - fix double-free in per-CPU stream cleanup
Details

In the Linux kernel, the following vulnerability has been resolved:

crypto: zstd - fix double-free in per-CPU stream cleanup

The crypto/zstd module has a double-free bug that occurs when multiple tfms are allocated and freed.

The issue happens because zstdstreams (per-CPU contexts) are freed in zstdexit() during every tfm destruction, rather than being managed at the module level. When multiple tfms exist, each tfm exit attempts to free the same shared per-CPU streams, resulting in a double-free.

This leads to a stack trace similar to:

BUG: Bad page state in process kworker/u16:1 pfn:106fd93 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106fd93 flags: 0x17ffffc0000000(node=0|zone=2|lastcpupid=0x1fffff) pagetype: 0xffffffff() raw: 0017ffffc0000000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: nonzero entiremapcount Modules linked in: ... CPU: 3 UID: 0 PID: 2506 Comm: kworker/u16:1 Kdump: loaded Tainted: G B Hardware name: ... Workqueue: btrfs-delalloc btrfsworkhelper Call Trace: <TASK> dumpstacklvl+0x5d/0x80 badpage+0x71/0xd0 freeunrefpageprepare+0x24e/0x490 freeunrefpage+0x60/0x170 cryptoacompfreestreams+0x5d/0xc0 cryptoacompexittfm+0x23/0x50 cryptodestroytfm+0x60/0xc0 ...

Change the lifecycle management of zstd_streams to free the streams only once during module cleanup.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68262.json"
}
References

Affected packages

Git / 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
f5ad93ffb54119a8dc5e18f070624d4ead586969
Fixed
dc0f4509b0ed5d82bef78e058db0ac4df04d0695
Fixed
e983feaa79de1e46c9087fb9f02fedb0e5397ce6
Fixed
48bc9da3c97c15f1ea24934bcb3b736acd30163d

Affected versions

v6.*
v6.16
v6.16-rc2
v6.16-rc3
v6.16-rc4
v6.16-rc5
v6.16-rc6
v6.16-rc7
v6.17
v6.17-rc1
v6.17-rc2
v6.17-rc3
v6.17-rc4
v6.17-rc5
v6.17-rc6
v6.17-rc7
v6.17.1
v6.17.10
v6.17.11
v6.17.2
v6.17.3
v6.17.4
v6.17.5
v6.17.6
v6.17.7
v6.17.8
v6.17.9
v6.18
v6.18-rc1
v6.18-rc2
v6.18-rc3
v6.18-rc4
v6.18-rc5
v6.18-rc6
v6.18-rc7

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68262.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.17.0
Fixed
6.17.12
Type
ECOSYSTEM
Events
Introduced
6.18.0
Fixed
6.18.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-68262.json"