VsockPacket::hdr holds a raw pointer to the address of the VSock packet header, which is in guest memory. It opens the door to double-fetch (or TOCTOU) race conditions. Therefore, VSockPacket::hdr content can't be trusted since it can be arbitrarily changed by the guest, at any time. To mitigate this, we can copy the header content to an array in VMM's memory that the guest can't modify. Signed-off-by: Thomas Leroy <thomas.leroy.mp@gmail.com> |
||
|---|---|---|
| .. | ||
| src | ||
| build.rs | ||
| Cargo.toml | ||