You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means concurrent SNP_GET_REPORT requests can now overwrite each other's data.
The following Python script demonstrates the issue. It requests attestation reports with either 1s or 2s as user data and only prints something if the report's data doesn't match the requested data.
This is due to a bug in the
sev-guest
device. In commit "virt: sev-guest: Reduce the scope of SNP command mutex", the command mutex was narrowed tosnp_send_guest_request
. The reasoning was that all shared state is handled in this function.SNP_GET_REPORT
requests share a single buffer for the report's user data though: https://github.com/torvalds/linux/blob/1e15510b71c99c6e49134d756df91069f7d18141/drivers/virt/coco/sev-guest/sev-guest.c#L74Writes to this buffer are now no longer guarded by the mutex: https://github.com/torvalds/linux/blob/1e15510b71c99c6e49134d756df91069f7d18141/drivers/virt/coco/sev-guest/sev-guest.c#L83
This means concurrent
SNP_GET_REPORT
requests can now overwrite each other's data.The following Python script demonstrates the issue. It requests attestation reports with either 1s or 2s as user data and only prints something if the report's data doesn't match the requested data.
It should never output anything, but running this in a VM with Linux 6.13 prints
Note in particular the mixed
\x01
and\x02
.The text was updated successfully, but these errors were encountered: