CVE-2025-39936: crypto: ccp - Always pass in an error pointer to __sev_platform_shutdown_locked()

Published Oct 4, 2025
·
Updated

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

crypto: ccp - Always pass in an error pointer to sevplatformshutdownlocked()

When

9770b428b1a2 ("crypto: ccp - Move devinfo/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 sevfirmwareshutdown() calls sevplatformshutdownlocked() 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: errorcode(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:sevplatformshutdownlocked.cold+0x0/0x21 [ccp]

That rIP is:

00000000000006fd <sevplatformshutdownlocked.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> sevfirmwareshutdown.isra.0 sevdevdestroy pspdevdestroy spdestroy pcideviceshutdown deviceshutdown kernelpoweroff hibernate.cold statestore kernfsfopwriteiter vfswrite ksyswrite dosyscall64 entrySYSCALL64afterhwframe

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 Software

8 affected components
Linux Linux kernel>=6.17.0-rc4
Linux Linux kernel>=6.16<6.16.9
Linux Linux kernel=6.17-rc1
Linux Linux kernel=6.17-rc2
Linux Linux kernel=6.17-rc3
Linux Linux kernel=6.17-rc4
Linux Linux kernel=6.17-rc5
Linux Linux kernel=6.17-rc6

Event History

Oct 4, 2025
CVE Published
via MITRE·07:30 AM
Data Sourced
via MITRE·07:30 AM
Description
Data Sourced
via NVD·08:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-39936?

CVE-2025-39936 has been classified as a moderate severity vulnerability in the Linux kernel.

2

How do I fix CVE-2025-39936?

To fix CVE-2025-39936, it is recommended to update the Linux kernel to a version higher than 6.17.0-rc4 where the vulnerability has been resolved.

3

What impact does CVE-2025-39936 have?

The impact of CVE-2025-39936 relates to improper handling of error messages during the SEV/SNP initialization and shutdown processes.

4

Which versions of the Linux kernel are affected by CVE-2025-39936?

CVE-2025-39936 affects the Linux kernel starting from version 6.17.0-rc4.

5

Is there a specific patch for CVE-2025-39936?

Yes, the patch for CVE-2025-39936 is included in the subsequent stable releases of the Linux kernel following the affected version.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203