CVE-2024-45004 KEYS: trusted: dcp: fix leak of blob encryption key
An attacker with local access can leak the plain text blob encryption key by importing and then exporting a trusted DCP-based key.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-45004?
CVE-2024-45004 is a medium-severity vulnerability in Linux kernel, published on 4 Sep 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
KEYS: trusted: dcp: fix leak of blob encryption key
Trusted keys unseal the key blob on load, but keep the sealed payload in the blob field so that every subsequent read (export) will simply convert this field to hex and send it to userspace.
With DCP-based trusted keys, we decrypt the blob encryption key (BEK) in the Kernel due hardware limitations and then decrypt the blob payload. BEK decryption is done in-place which means that the trusted key blob field is modified and it consequently holds the BEK in plain text. Every subsequent read of that key thus send the plain text BEK instead of the encrypted BEK to userspace.
This issue only occurs when importing a trusted DCP-based key and then exporting it again. This should rarely happen as the common use cases are to either create a new trusted key and export it, or import a key blob and then just use it without exporting it again.
Fix this by performing BEK decryption and encryption in a dedicated buffer. Further always wipe the plain text BEK buffer to prevent leaking the key via uninitialized memory.
Weakness: CWE-312
Which versions are affected by CVE-2024-45004?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-45004?
Apply the vendor's patch.
Is CVE-2024-45004 being exploited?
There is no known exploitation of CVE-2024-45004 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-45004, DEBIAN-CVE-2024-45004, GHSA-g596-f5rr-4qjp, UBUNTU-CVE-2024-45004.