mythril icon indicating copy to clipboard operation
mythril copied to clipboard

acpi: RSDP is not found when on Ubuntu 18.04

Open dlrobertson opened this issue 5 years ago • 12 comments

Summary

When running make qemu from a Ubuntu 18.04 host we fail to find the RSDP.

  [   0.000000] MYTHRIL-INFO: tsc calibrate diff=5493740 (khz=3200699)
  [   0.000001] MYTHRIL-INFO: Allocating from 0x3320ecd-3ffe0000
  [   0.000528] MYTHRIL-ERROR: Panic in mythril_multiboot2/src/main.rs at (241, 16):
  [   0.001074] MYTHRIL-ERROR: Failed to find the RSDP: NotFound

CC: @barkera @ntegan @sruffell

dlrobertson avatar May 23 '20 15:05 dlrobertson

Is found, however, via the multiboot crate BootInformation as in

https://github.com/mythril-hypervisor/mythril/pull/56

ntegan avatar May 23 '20 17:05 ntegan

Bizarrely I can't reproduce this under docker at all. Using the 18.04 container (grub-mkrescue (GRUB) 2.02-2ubuntu8.15 and QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.26)), things seem to work as expected. I suppose that pretty much narrows it down to a kvm issue in whatever kernel ubuntu 18.04 uses.

ALSchwalm avatar May 24 '20 03:05 ALSchwalm

Anybody have a 18.10 ubuntu box to test on? This isn't that shocking now that I think about it. Nested virtualization was probably not super functional back then.

ALSchwalm avatar May 24 '20 03:05 ALSchwalm

Bizarrely I can't reproduce this under docker at all.

Sanity check: was this pre https://github.com/mythril-hypervisor/mythril/commit/36bb1e165b257e70ae5ae4ddf5d7b24e33a09f07 ?

Anybody have a 18.10 ubuntu box to test on?

Installing it on an old laptop now.

dlrobertson avatar May 24 '20 16:05 dlrobertson

Correct, this was before the multiboot stuff

ALSchwalm avatar May 24 '20 17:05 ALSchwalm

I suppose that pretty much narrows it down to a kvm issue in whatever kernel ubuntu 18.04 uses.

Can confirm. We find the RSDP when we disable kvm on a Ubuntu 18.04 box. When dumping memory in gdb, it seems that the main bios area is zeroed out.

dlrobertson avatar May 25 '20 02:05 dlrobertson

Ah, we can test that because we don't need kvm for the nested virt until we actually go vtx-on. Clever. Well I guess now we just need to determine when they fixed that and document the earliest supported kernel version for testing.

ALSchwalm avatar May 25 '20 15:05 ALSchwalm

I could do some brute force searching of which kernels work, once I finish the other issue i'm working on.

unless you guys get to it first

ntegan avatar May 27 '20 01:05 ntegan

Honestly I really just want to know if it works in 18.10. That would be sufficient for a minimum viable platform kind of thing.

I'd really like to spin up a test platform at some point, though I'm not sure how we would actually integrate it in to the current CI approach. Moving the project to gitlab might make sense.

ALSchwalm avatar May 27 '20 02:05 ALSchwalm

Honestly I really just want to know if it works in 18.10. That would be sufficient for a minimum viable platform kind of thing.

Would the work to use the multiboot info satisfy this?

dlrobertson avatar Jun 12 '20 02:06 dlrobertson

I don't hit this issue when I force the RSDP search on ubuntu 20.04.

dlrobertson avatar Jun 20 '20 03:06 dlrobertson

Is this issue still hit? I don't think we should hit this any more now that we also look in the multiboot info

dlrobertson avatar Dec 19 '20 03:12 dlrobertson