ID

VAR-201906-0236


CVE

CVE-2019-9836


TITLE

Secure Encrypted Virtualization Cryptographic vulnerability

Trust: 0.8

sources: JVNDB: JVNDB-2019-005971

DESCRIPTION

Secure Encrypted Virtualization (SEV) on Advanced Micro Devices (AMD) Platform Security Processor (PSP; aka AMD Secure Processor or AMD-SP) 0.17 build 11 and earlier has an insecure cryptographic implementation. Secure Encrypted Virtualization (SEV) Contains a cryptographic vulnerability.Information may be obtained. AMD Platform Security Processor is a security processor of American AMD Company. An attacker could exploit this vulnerability to obtain information. SEV protects guest virtual machines from the hypervisor, provides confidentiality guarantees at runtime and remote attestation at launch time. See [1] for details. SEV key management code runs inside the Platform Security Processor (PSP) [2]. The SEV elliptic-curve (ECC) implementation was found to be vulnerable to an invalid curve attack. At launch-start command, an attacker can send small order ECC points not on the official NIST curves, and force the SEV firmware to multiply a small order point by the firmware’s private DH scalar. By collecting enough modular residues, an attacker can recover the complete PDH private key. With the PDH, an attacker can recover the session key and the VM’s launch secret. This breaks the confidentiality guarantees offered by SEV. Key exchange during VM launch ========================= 1. The PSP publishes its PDH public key through SEV_PDH_CERT_EXPORT command. This key is computed by multiplying the ECC generator (NIST P256/P384 curves are supported) by the PDH private key: A<-G*k, where k, the private key, is randomly generated in the range (1, order(G)). 2. The client generates its private DH key, s, and computes the shared key C<-A*s=G*k*s. C is the shared point on the curve. Its x-coordinate is hashed and used as the master shared secret. Two keys KEK/KIK are derived from the master secret, and used to protect (encryption+integrity) the session keys. 3. The client computes its public key B<-G*s and sends it to the PSP through the SEV_LAUNCH_START command. 4. The PSP computes the shared key C by multiplying the client’s public key by its PDH private scalar: C<-B*k=G*s*k. Like the client, the PSP takes C’s x coordinate, computes the master shared secret and derives the KEK/KIK. These are used to unwrap the session keys. See API specification [3] for details. ECDH security relies on the generator point, G, having a large order and on the discrete logarithm problem being hard for the curve. Note that in step 4, the PSP performs a computation with its private key on user supplied data - the client’s public point. Invalid curve attack =============== ECC point multiplication relies on a point addition primitive. There are different implementations for ECC point addition. A common one is based on the short Weierstrass ECC form, as described in [4]. Note that the curve’s "b" equation parameter is never used. An invalid curve attack is where the ECDH point multiplication is done on a different curve - different (a,b) parameters. This becomes possible in the short Weierstrass point addition function since the "b" parameter is not used. On this curve, the point has a small prime order. By trying all possible values for the small order point, an attacker can recover the private scalar bits (modulo the order). The modular residues are assembled offline using the Chinese Remainder Theorem, leading to a full key recovery. See the original paper [5] on invalid curve attacks, or a more recent paper [6] on the topic. Affected products ============= AMD EPYC server platforms (codename "Naples") running SEV firmware version 0.17 build 11 and below are affected. Fix === We were able to verify the fix is properly implemented in build 22 [7]: PSP rejects points not on the NIST curve, and fails with INVALID_CERT error. Additional issues ============= Certificates for PDH keys generated on a vulnerable system are still valid. This means SEV might still be vulnerable to a migration attack, where a client’s VM is migrated from a non-vulnerable system to a vulnerable one. In addition, at this point, it is not clear whether SEV is vulnerable to a FW downgrade attack. Credits ====== This vulnerability was discovered and reported to AMD by Cfir Cohen of the Google Cloud security team. Timeline ======= 2-19 - Vulnerability disclosed to AMD PSIRT 2-23 - AMD confirms the bug 2-25 - POC shared with AMD 5-13 - AMD requests a 30 day extension 6-04 - AMD releases fixed firmware [7] 6-07 - AMD requests a 2 week extension 6-25 - Public disclosure [1] - https://developer.amd.com/sev/ [2] - https://en.wikipedia.org/wiki/AMD_Platform_Security_Processor [3] - https://developer.amd.com/wp-content/resources/55766.PDF [4] - https://www.hyperelliptic.org/EFD/g1p/auto-shortw.html [5] - https://www.iacr.org/archive/crypto2000/18800131/18800131.pdf [6] - http://www.cs.technion.ac.il/~biham/BT/bt-fixed-coordinate-invalid-curve-attack.pdf [7] - https://developer.amd.com/wp-content/resources/amd_sev_fam17h_model0xh_0.17b22.zip

Trust: 1.89

sources: NVD: CVE-2019-9836 // JVNDB: JVNDB-2019-005971 // VULHUB: VHN-161271 // VULMON: CVE-2019-9836 // PACKETSTORM: 153436

AFFECTED PRODUCTS

vendor:opensusemodel:leapscope:eqversion:15.0

Trust: 1.0

vendor:opensusemodel:leapscope:eqversion:15.1

Trust: 1.0

vendor:amdmodel:secure encrypted virtualizationscope:lteversion:0.17b11

Trust: 1.0

vendor:advanced micro devices amdmodel:secure encrypted virtualizationscope:eqversion:0.17 build 11

Trust: 0.8

sources: JVNDB: JVNDB-2019-005971 // NVD: CVE-2019-9836

CVSS

SEVERITY

CVSSV2

CVSSV3

nvd@nist.gov: CVE-2019-9836
value: MEDIUM

Trust: 1.0

NVD: CVE-2019-9836
value: MEDIUM

Trust: 0.8

CNNVD: CNNVD-201906-922
value: MEDIUM

Trust: 0.6

VULHUB: VHN-161271
value: MEDIUM

Trust: 0.1

VULMON: CVE-2019-9836
value: MEDIUM

Trust: 0.1

nvd@nist.gov: CVE-2019-9836
severity: MEDIUM
baseScore: 5.0
vectorString: AV:N/AC:L/AU:N/C:P/I:N/A:N
accessVector: NETWORK
accessComplexity: LOW
authentication: NONE
confidentialityImpact: PARTIAL
integrityImpact: NONE
availabilityImpact: NONE
exploitabilityScore: 10.0
impactScore: 2.9
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 1.9

VULHUB: VHN-161271
severity: MEDIUM
baseScore: 5.0
vectorString: AV:N/AC:L/AU:N/C:P/I:N/A:N
accessVector: NETWORK
accessComplexity: LOW
authentication: NONE
confidentialityImpact: PARTIAL
integrityImpact: NONE
availabilityImpact: NONE
exploitabilityScore: 10.0
impactScore: 2.9
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 0.1

nvd@nist.gov: CVE-2019-9836
baseSeverity: MEDIUM
baseScore: 5.3
vectorString: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
attackVector: NETWORK
attackComplexity: LOW
privilegesRequired: NONE
userInteraction: NONE
scope: UNCHANGED
confidentialityImpact: LOW
integrityImpact: NONE
availabilityImpact: NONE
exploitabilityScore: 3.9
impactScore: 1.4
version: 3.1

Trust: 1.0

NVD: CVE-2019-9836
baseSeverity: MEDIUM
baseScore: 5.3
vectorString: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
attackVector: NETWORK
attackComplexity: LOW
privilegesRequired: NONE
userInteraction: NONE
scope: UNCHANGED
confidentialityImpact: LOW
integrityImpact: NONE
availabilityImpact: NONE
exploitabilityScore: NONE
impactScore: NONE
version: 3.0

Trust: 0.8

sources: VULHUB: VHN-161271 // VULMON: CVE-2019-9836 // JVNDB: JVNDB-2019-005971 // CNNVD: CNNVD-201906-922 // NVD: CVE-2019-9836

PROBLEMTYPE DATA

problemtype:CWE-327

Trust: 1.0

problemtype:CWE-310

Trust: 0.9

sources: VULHUB: VHN-161271 // JVNDB: JVNDB-2019-005971 // NVD: CVE-2019-9836

THREAT TYPE

remote

Trust: 0.7

sources: PACKETSTORM: 153436 // CNNVD: CNNVD-201906-922

TYPE

encryption problem

Trust: 0.6

sources: CNNVD: CNNVD-201906-922

CONFIGURATIONS

sources: JVNDB: JVNDB-2019-005971

PATCH

title:Secure Encrypted Virtualization Invalid ECC Curve Points (CVE-2019-9836)url:https://www.amd.com/en/corporate/product-security

Trust: 0.8

title:AMD Platform Security Processor Secure Encrypted Virtualization Security vulnerabilitiesurl:http://www.cnnvd.org.cn/web/xxk/bdxqById.tag?id=94052

Trust: 0.6

title:Debian CVElist Bug Report Logs: firmware-nonfree: Please add AMD-SEV firmware files (amd-folder) to close CVE-2019-9836 on specific EPYC-CPUsurl:https://vulmon.com/vendoradvisory?qidtp=debian_cvelist_bugreportlogs&qid=f38d2be7d799498a8167385e98a25b5d

Trust: 0.1

title:Debian Security Advisories: DSA-5459-1 amd64-microcode -- security updateurl:https://vulmon.com/vendoradvisory?qidtp=debian_security_advisories&qid=cba30181a6a30ef97d2f3c4353fa3ffe

Trust: 0.1

sources: VULMON: CVE-2019-9836 // JVNDB: JVNDB-2019-005971 // CNNVD: CNNVD-201906-922

EXTERNAL IDS

db:NVDid:CVE-2019-9836

Trust: 2.7

db:PACKETSTORMid:153436

Trust: 1.9

db:JVNDBid:JVNDB-2019-005971

Trust: 0.8

db:CNNVDid:CNNVD-201906-922

Trust: 0.7

db:AUSCERTid:ESB-2019.2518

Trust: 0.6

db:AUSCERTid:ESB-2019.2545

Trust: 0.6

db:VULHUBid:VHN-161271

Trust: 0.1

db:VULMONid:CVE-2019-9836

Trust: 0.1

sources: VULHUB: VHN-161271 // VULMON: CVE-2019-9836 // JVNDB: JVNDB-2019-005971 // PACKETSTORM: 153436 // CNNVD: CNNVD-201906-922 // NVD: CVE-2019-9836

REFERENCES

url:http://packetstormsecurity.com/files/153436/amd-secure-encrypted-virtualization-sev-key-recovery.html

Trust: 2.4

url:https://www.amd.com/en/corporate/product-security

Trust: 1.8

url:https://seclists.org/fulldisclosure/2019/jun/46

Trust: 1.8

url:http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00032.html

Trust: 1.8

url:https://support.hpe.com/hpsc/doc/public/display?doclocale=en_us&docid=emr_na-hpesbhf03943en_us

Trust: 1.7

url:https://nvd.nist.gov/vuln/detail/cve-2019-9836

Trust: 1.5

url:https://cve.mitre.org/cgi-bin/cvename.cgi?name=cve-2019-9836

Trust: 0.8

url:https://www.suse.com/support/update/announcement/2019/suse-su-20191792-1.html

Trust: 0.6

url:https://www.suse.com/support/update/announcement/2019/suse-su-20191803-1/

Trust: 0.6

url:https://www.suse.com/support/update/announcement/2019/suse-su-20191802-1/

Trust: 0.6

url:https://vigilance.fr/vulnerability/amd-secure-processor-information-disclosure-via-sev-insecure-cryptography-29729

Trust: 0.6

url:https://www.auscert.org.au/bulletins/esb-2019.2518/

Trust: 0.6

url:https://www.auscert.org.au/bulletins/esb-2019.2545/

Trust: 0.6

url:https://support.hpe.com/hpsc/doc/public/display?doclocale=en_us&amp;docid=emr_na-hpesbhf03943en_us

Trust: 0.1

url:https://cwe.mitre.org/data/definitions/327.html

Trust: 0.1

url:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970395

Trust: 0.1

url:https://nvd.nist.gov

Trust: 0.1

url:https://www.debian.org/security/2023/dsa-5459

Trust: 0.1

url:https://developer.amd.com/wp-content/resources/55766.pdf

Trust: 0.1

url:https://developer.amd.com/wp-content/resources/amd_sev_fam17h_model0xh_0.17b22.zip

Trust: 0.1

url:http://www.cs.technion.ac.il/~biham/bt/bt-fixed-coordinate-invalid-curve-attack.pdf

Trust: 0.1

url:https://www.hyperelliptic.org/efd/g1p/auto-shortw.html

Trust: 0.1

url:https://www.iacr.org/archive/crypto2000/18800131/18800131.pdf

Trust: 0.1

url:https://developer.amd.com/sev/

Trust: 0.1

url:https://en.wikipedia.org/wiki/amd_platform_security_processor

Trust: 0.1

sources: VULHUB: VHN-161271 // VULMON: CVE-2019-9836 // JVNDB: JVNDB-2019-005971 // PACKETSTORM: 153436 // CNNVD: CNNVD-201906-922 // NVD: CVE-2019-9836

CREDITS

Google Security Research

Trust: 0.6

sources: CNNVD: CNNVD-201906-922

SOURCES

db:VULHUBid:VHN-161271
db:VULMONid:CVE-2019-9836
db:JVNDBid:JVNDB-2019-005971
db:PACKETSTORMid:153436
db:CNNVDid:CNNVD-201906-922
db:NVDid:CVE-2019-9836

LAST UPDATE DATE

2024-11-23T21:52:11.714000+00:00


SOURCES UPDATE DATE

db:VULHUBid:VHN-161271date:2019-07-21T00:00:00
db:VULMONid:CVE-2019-9836date:2022-04-18T00:00:00
db:JVNDBid:JVNDB-2019-005971date:2019-07-04T00:00:00
db:CNNVDid:CNNVD-201906-922date:2022-04-19T00:00:00
db:NVDid:CVE-2019-9836date:2024-11-21T04:52:24.357

SOURCES RELEASE DATE

db:VULHUBid:VHN-161271date:2019-06-25T00:00:00
db:VULMONid:CVE-2019-9836date:2019-06-25T00:00:00
db:JVNDBid:JVNDB-2019-005971date:2019-07-04T00:00:00
db:PACKETSTORMid:153436date:2019-06-26T15:55:45
db:CNNVDid:CNNVD-201906-922date:2019-06-25T00:00:00
db:NVDid:CVE-2019-9836date:2019-06-25T21:15:09.857