crypto: ccp - Fix use-after-free on error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
crypto: ccp - Fix use-after-free on error path
In the error path of sev_tsm_init_locked(), the code dereferences 't' after it has been freed with kfree(). The pr_err() statement attempts to access t->tio_en and t->tio_init_done after the memory has been released.
Move the pr_err() call before kfree(t) to access the fields while the memory is still valid.
This issue reported by Smatch static analyser
From the CVE record · Linux
The Linux kernel's crypto ccp code dereferences freed memory in the error path of sev_tsm_init_locked(). This could cause a use-after-free when that error path is reached; the input does not establish how an attacker could trigger it or whether authentication or user interaction is required.
Engineers running the Linux kernel should check their versions; affected versions are not specified.