Skip to content

Commit 4fe54f5

Browse files
vitkabelerafaeljw
authored andcommitted
ACPICA: Check that EBDA pointer is in valid memory
ACPICA commit cc9e7763ceb2e2649fe3422130416d84a3c6854a If the memory at 0x40e is uninitialized, the retrieved physical_memory address of EBDA may be beyond the low memory (i.e. above 640K). If so, the kernel may unintentionally access the VGA memory, that might not be decoded or even present in case of virtualization. Link: acpica/acpica@cc9e7763 Signed-off-by: Vit Kabele <[email protected]> Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 5c62d5a commit 4fe54f5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/acpi/acpica/tbxfroot.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ acpi_find_root_pointer(acpi_physical_address *table_address)
139139

140140
/* EBDA present? */
141141

142-
if (physical_address > 0x400) {
142+
/*
143+
* Check that the EBDA pointer from memory is sane and does not point
144+
* above valid low memory
145+
*/
146+
if (physical_address > 0x400 && physical_address < 0xA0000) {
143147
/*
144148
* 1b) Search EBDA paragraphs (EBDA is required to be a
145149
* minimum of 1K length)

0 commit comments

Comments
 (0)