# CVE-2025-39936: crypto: ccp - Always pass in an error pointer to \_\_sev\_platform\_shutdown\_locked()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.22% (percentile 7, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2025-10-04T07:30:59.857Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= e6bef2d0dfa036afc32df982240d0368b17ee7fd, \< fa30d62ab62d8a123f20febaca4390525e2d2ad5; \>= 9770b428b1a28360663f1f5e524ee458b4cf454b, \< bc509293c9d4f4f74e776f4a0bbb61f63c041938; \>= 9770b428b1a28360663f1f5e524ee458b4cf454b, \< 46834d90a9a13549264b9581067d8f746b4b36cc
- Anyone running Linux 6.16

## Description

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

crypto: ccp - Always pass in an error pointer to \_\_sev\_platform\_shutdown\_locked()

When

  9770b428b1a2 ("crypto: ccp - Move dev\_info/err messages for SEV/SNP init and shutdown")

moved the error messages dumping so that they don't need to be issued by
the callers, it missed the case where \_\_sev\_firmware\_shutdown() calls
\_\_sev\_platform\_shutdown\_locked() with a NULL argument which leads to
a NULL ptr deref on the shutdown path, during suspend to disk:

  \#PF: supervisor read access in kernel mode
  \#PF: error\_code(0x0000) - not-present page
  PGD 0 P4D 0
  Oops: Oops: 0000 \[\#1\] SMP NOPTI
  CPU: 0 UID: 0 PID: 983 Comm: hib.sh Not tainted 6.17.0-rc4+ \#1 PREEMPT(voluntary)
  Hardware name: Supermicro Super Server/H12SSL-i, BIOS 2.5 09/08/2022
  RIP: 0010:\_\_sev\_platform\_shutdown\_locked.cold+0x0/0x21 \[ccp\]

That rIP is:

  00000000000006fd \<\_\_sev\_platform\_shutdown\_locked.cold\>:
   6fd:   8b 13                   mov    (%rbx),%edx
   6ff:   48 8b 7d 00             mov    0x0(%rbp),%rdi
   703:   89 c1                   mov    %eax,%ecx

  Code: 74 05 31 ff 41 89 3f 49 8b 3e 89 ea 48 c7 c6 a0 8e 54 a0 41 bf 92 ff ff ff e8 e5 2e 09 e1 c6 05 2a d4 38 00 01 e9 26 af ff ff \<8b\> 13 48 8b 7d 00 89 c1 48 c7 c6 18 90 54 a0 89 44 24 04 e8 c1 2e
  RSP: 0018:ffffc90005467d00 EFLAGS: 00010282
  RAX: 00000000ffffff92 RBX: 0000000000000000 RCX: 0000000000000000
  			     ^^^^^^^^^^^^^^^^
and %rbx is nice and clean.

  Call Trace:
   \<TASK\>
   \_\_sev\_firmware\_shutdown.isra.0
   sev\_dev\_destroy
   psp\_dev\_destroy
   sp\_destroy
   pci\_device\_shutdown
   device\_shutdown
   kernel\_power\_off
   hibernate.cold
   state\_store
   kernfs\_fop\_write\_iter
   vfs\_write
   ksys\_write
   do\_syscall\_64
   entry\_SYSCALL\_64\_after\_hwframe

Pass in a pointer to the function-local error var in the caller.

With that addressed, suspending the ccp shows the error properly at
least:

  ccp 0000:47:00.1: sev command 0x2 timed out, disabling PSP
  ccp 0000:47:00.1: SEV: failed to SHUTDOWN error 0x0, rc -110
  SEV-SNP: Leaking PFN range 0x146800-0x146a00
  SEV-SNP: PFN 0x146800 unassigned, dumping non-zero entries in 2M PFN region: \[0x146800 - 0x146a00\]
  ...
  ccp 0000:47:00.1: SEV-SNP firmware shutdown failed, rc -16, error 0x0
  ACPI: PM: Preparing to enter system sleep state S5
  kvm: exiting hardware virtualization
  reboot: Power down

Btw, this driver is crying to be cleaned up to pass in a proper I/O
struct which can be used to store information between the different
functions, otherwise stuff like that will happen in the future again.

## Affected and fixed versions

- Linux: \>= e6bef2d0dfa036afc32df982240d0368b17ee7fd, \< fa30d62ab62d8a123f20febaca4390525e2d2ad5; \>= 9770b428b1a28360663f1f5e524ee458b4cf454b, \< bc509293c9d4f4f74e776f4a0bbb61f63c041938; \>= 9770b428b1a28360663f1f5e524ee458b4cf454b, \< 46834d90a9a13549264b9581067d8f746b4b36cc (cvelist)
- Linux: 6.16 (cvelist)

## Mitigation

- Upgrade Linux to 46834d90a9a13549264b9581067d8f746b4b36cc or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-39936. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-39936.md
Affected: Linux >= e6bef2d0dfa036afc32df982240d0368b17ee7fd, < fa30d62ab62d8a123f20febaca4390525e2d2ad5; >= 9770b428b1a28360663f1f5e524ee458b4cf454b, < bc509293c9d4f4f74e776f4a0bbb61f63c041938; >= 9770b428b1a28360663f1f5e524ee458b4cf454b, < 46834d90a9a13549264b9581067d8f746b4b36cc; Linux 6.16
Fixed in: Linux 46834d90a9a13549264b9581067d8f746b4b36cc

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-39936 being exploited?

There is no confirmed exploitation: CVE-2025-39936 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2025-39936?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-39936?

Linux \>= e6bef2d0dfa036afc32df982240d0368b17ee7fd, \< fa30d62ab62d8a123f20febaca4390525e2d2ad5; \>= 9770b428b1a28360663f1f5e524ee458b4cf454b, \< bc509293c9d4f4f74e776f4a0bbb61f63c041938; \>= 9770b428b1a28360663f1f5e524ee458b4cf454b, \< 46834d90a9a13549264b9581067d8f746b4b36cc; Linux 6.16.

### Is there a fix for CVE-2025-39936?

Yes. Fixed in Linux 46834d90a9a13549264b9581067d8f746b4b36cc. Upgrade Linux to 46834d90a9a13549264b9581067d8f746b4b36cc or later.

### How do I check if I'm affected by CVE-2025-39936?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/bc509293c9d4f4f74e776f4a0bbb61f63c041938>
- patch: <https://git.kernel.org/stable/c/46834d90a9a13549264b9581067d8f746b4b36cc>
- other: <https://git.kernel.org/stable/c/fa30d62ab62d8a123f20febaca4390525e2d2ad5>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-39936>

HTML: <https://flawdb.com/CVE-2025-39936> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-39936>
