-
Notifications
You must be signed in to change notification settings - Fork 179
ide: audit enlightened INT13 command set and consider restricting to BIOS-issued commands #3133
Description
The enlightened INT13 HDD path (enlightened_hdd_command) currently accepts any IdeCommand value from the guest-provided EnlightenedInt13Command.command field without validation.
Two questions worth investigating:
-
What commands does the Hyper-V synthetic BIOS actually send via the enlightened INT13 port? This requires access to the BIOS firmware source to determine the exact command set.
-
Should we restrict the enlightened path to only accept commands the BIOS is known to issue? Adding an allowlist would make the contract explicit and prevent silent misbehavior for unexpected commands — a defense-in-depth improvement.
Context: This came up during review of #3062 (adding WRITE_DMA_FUA_EXT to the 48-bit LBA setup). The fix in #3062 is a consistency fix between the enlightened register setup and handle_command(), but the broader question of which commands the BIOS actually sends — and whether we should enforce that — is worth tracking separately.
Related:
- ide: include WRITE_DMA_FUA_EXT in enlightened 48-bit LBA setup #3062 — WRITE_DMA_FUA_EXT 48-bit LBA setup fix
- ide: ignore non-DMA commands in enlightened INT13 path #3040 — non-DMA command rejection (DMA allowlist for the enlightened path)
- ide: enlightened INT13 path skips 48-bit LBA setup for WRITE_DMA_FUA_EXT #3061 — original issue for the FUA_EXT bug