{"id":"CVE-2026-45959","state":"PUBLISHED","title":"crypto: ccp - Fix a crash due to incorrect cleanup usage of kfree","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: ccp - Fix a crash due to incorrect cleanup usage of kfree\n\nAnnotating a local pointer variable, which will be assigned with the\nkmalloc-family functions, with the `__cleanup(kfree)` attribute will\nmake the address of the local variable, rather than the address returned\nby kmalloc, passed to kfree directly and lead to a crash due to invalid\ndeallocation of stack address. According to other places in the repo,\nthe correct usage should be `__free(kfree)`. The code coincidentally\ncompiled because the parameter type `void *` of kfree is compatible with\nthe desired type `struct { ... } **`.","publishedAt":"2026-05-27T12:18:16.039Z","updatedAt":"2026-10-19T19:26:40.585Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a71475582ada92ba021852bf3c2b40ab3718549b","status":"affected","lessThan":"9a3ace9b010ffd8c422c97844ae152f7c53d6b18","versionType":"git"},{"version":"a71475582ada92ba021852bf3c2b40ab3718549b","status":"affected","lessThan":"90f9090e3e744a8fe3bb6fa0e61f577347728b0b","versionType":"git"},{"version":"a71475582ada92ba021852bf3c2b40ab3718549b","status":"affected","lessThan":"d5abcc33ee76bc26d58b39dc1a097e43a99dd438","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/ccp/ccp-ops.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.18.14","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.4","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/ccp/ccp-ops.c"]}],"references":["https://git.kernel.org/stable/c/9a3ace9b010ffd8c422c97844ae152f7c53d6b18","https://git.kernel.org/stable/c/90f9090e3e744a8fe3bb6fa0e61f577347728b0b","https://git.kernel.org/stable/c/d5abcc33ee76bc26d58b39dc1a097e43a99dd438"],"weaknesses":["CWE-787"],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/45xxx/CVE-2026-45959.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-45959","state":"PUBLISHED","datePublished":"2026-05-27T12:18:16.039Z","dateUpdated":"2026-10-19T19:26:40.585Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-05-13T15:03:33.089Z"},"containers":{"cna":{"title":"crypto: ccp - Fix a crash due to incorrect cleanup usage of kfree","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: ccp - Fix a crash due to incorrect cleanup usage of kfree\n\nAnnotating a local pointer variable, which will be assigned with the\nkmalloc-family functions, with the `__cleanup(kfree)` attribute will\nmake the address of the local variable, rather than the address returned\nby kmalloc, passed to kfree directly and lead to a crash due to invalid\ndeallocation of stack address. According to other places in the repo,\nthe correct usage should be `__free(kfree)`. The code coincidentally\ncompiled because the parameter type `void *` of kfree is compatible with\nthe desired type `struct { ... } **`."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a71475582ada92ba021852bf3c2b40ab3718549b","status":"affected","lessThan":"9a3ace9b010ffd8c422c97844ae152f7c53d6b18","versionType":"git"},{"version":"a71475582ada92ba021852bf3c2b40ab3718549b","status":"affected","lessThan":"90f9090e3e744a8fe3bb6fa0e61f577347728b0b","versionType":"git"},{"version":"a71475582ada92ba021852bf3c2b40ab3718549b","status":"affected","lessThan":"d5abcc33ee76bc26d58b39dc1a097e43a99dd438","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/ccp/ccp-ops.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.18.14","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.4","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/ccp/ccp-ops.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/9a3ace9b010ffd8c422c97844ae152f7c53d6b18"},{"url":"https://git.kernel.org/stable/c/90f9090e3e744a8fe3bb6fa0e61f577347728b0b"},{"url":"https://git.kernel.org/stable/c/d5abcc33ee76bc26d58b39dc1a097e43a99dd438"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable AES-GCM path is reached through the local AF_ALG crypto socket interface (socket/bind/sendmsg syscalls), explicitly selectable via the \"gcm-aes-ccp\" driver name; there is no remote network peer required in the reliable trigger path.\nAC:L - The incorrect cleanup fires on every return from ccp_run_aes_gcm_cmd, so a single AES-GCM operation deterministically triggers the invalid free with no race, timing, or memory-layout condition the attacker must defeat.\nPR:L - Creating an AF_ALG socket and submitting a gcm(aes) request requires only a basic unprivileged local account with no capability; no root or special privilege is needed.\nUI:N - The attacker submits the crypto request entirely on its own; no victim action or separate user interaction is required.\nS:U - The invalid free corrupts and crashes within the kernel's own security authority and crosses no VM, sandbox, or IOMMU boundary.\nC:H - This is an invalid free (memory-corruption class, not a NULL deref); per UAF/corruption guidance the allocator's mishandling of the stack pointer can disturb slab state and freed-object contents, which can be leveraged toward information disclosure.\nI:H - Feeding kfree a stack address drives the SLUB allocator to write freelist pointers / drop refcounts on memory it never owned, a corruption primitive that per UAF/double-free guidance can be leveraged into a write affecting control flow.\nA:H - The bug deterministically passes a stack address to kfree on every invocation, causing an immediate kernel oops/panic (DoS) that any unprivileged local user can trigger repeatedly."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:28:57.463Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"6.18.14"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"6.19.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-45959","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-16T15:18:37.644714Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-787","lang":"en","type":"CWE","description":"CWE-787 Out-of-bounds Write"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T19:26:40.585Z"}}]}}}