{"id":"CVE-2025-39941","published":"2025-10-04T07:31:04Z","modified":"2026-08-05T12:06:15Z","title":"zram: fix slot write race condition","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nzram: fix slot write race condition\n\nParallel concurrent writes to the same zram index result in leaked\nzsmalloc handles.  Schematically we can have something like this:\n\nCPU0                              CPU1\nzram_slot_lock()\nzs_free(handle)\nzram_slot_lock()\n\t\t\t\tzram_slot_lock()\n\t\t\t\tzs_free(handle)\n\t\t\t\tzram_slot_lock()\n\ncompress\t\t\tcompress\nhandle = zs_malloc()\t\thandle = zs_malloc()\nzram_slot_lock\nzram_set_handle(handle)\nzram_slot_lock\n\t\t\t\tzram_slot_lock\n\t\t\t\tzram_set_handle(handle)\n\t\t\t\tzram_slot_lock\n\nEither CPU0 or CPU1 zsmalloc handle will leak because zs_free() is done\ntoo early.  In fact, we need to reset zram entry right before we set its\nnew handle, all under the same slot lock scope.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00149,"percentile":0.02089,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/ff750e9f2c4d63854c33967d1646b5e89a9a19a2","tags":[]},{"url":"https://git.kernel.org/stable/c/ce4be9e4307c5a60701ff6e0cafa74caffdc54ce","tags":[]}],"priority":{"score":5.9,"factors":[{"name":"EPSS percentile","points":0.42},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 71268035f5d734ad6373d953298bd5779985497a, < ff750e9f2c4d63854c33967d1646b5e89a9a19a2",">= 71268035f5d734ad6373d953298bd5779985497a, < ce4be9e4307c5a60701ff6e0cafa74caffdc54ce"]},{"vendor":"Linux","product":"Linux","versions":["6.14"]}],"euvd":{"id":"EUVD-2025-32389","exploited":false,"provenance":"source"}}