{
  "id": "CVE-2025-39941",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-39941",
  "published_at": "2025-10-04T07:31:04.08Z",
  "title": "zram: fix slot write race condition",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "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.",
  "cwe": "CWE-362",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc6:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8,
    "nvd": 4.7
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 71268035f5d734ad6373d953298bd5779985497a, \u003c ff750e9f2c4d63854c33967d1646b5e89a9a19a2",
          "\u003e= 71268035f5d734ad6373d953298bd5779985497a, \u003c ce4be9e4307c5a60701ff6e0cafa74caffdc54ce"
        ],
        "fixed_in": [
          "ff750e9f2c4d63854c33967d1646b5e89a9a19a2",
          "ce4be9e4307c5a60701ff6e0cafa74caffdc54ce"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.14"
        ],
        "fixed_in": [
          "0",
          "6.16.9",
          "6.17"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to ff750e9f2c4d63854c33967d1646b5e89a9a19a2 or ce4be9e4307c5a60701ff6e0cafa74caffdc54ce or later.",
      "Upgrade Linux to 0 or 6.16.9 or 6.17 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
