-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If the user specifies a Raw disk image, there are possible scenarios where the guest could misuse the disk image. In one such scenario, the guest could write a different image header into the first sector of the file. Mitigate this by forcing the guest to write to the first four bytes as a whole, and not byte-by-byte in any order. Additionally, mitigate this by verifying that if the offset into the disk image is zero and the length of the buffer to be written is greater than or equal to four, probe the buffer's first four bytes to make sure it's not a QCOW magic string ("QFI\xfb"). If any of these conditions are met, then reject the write. Signed-off-by: Jake Correnti <[email protected]>
- Loading branch information
1 parent
71d75e7
commit 7593e31
Showing
1 changed file
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters