Skip to content

Commit

Permalink
IH-507: Do not allow guest kernels in /boot/
Browse files Browse the repository at this point in the history
This location is for dom0's boot chain exclusively

Signed-off-by: Pau Ruiz Safont <[email protected]>
  • Loading branch information
psafont committed Jul 23, 2024
1 parent d88017e commit 5dc2900
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ocaml/xapi/xapi_xenops.ml
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,7 @@ let rtc_timeoffset_of_vm ~__context (vm, vm_t) vbds =
)
)

(* /boot/ contains potentially sensitive files like xen-initrd, only allow
directly booting guests from the subfolder /boot/guest/ *)
let allowed_dom0_directories_for_boot_files =
["/boot/guest/"; "/var/lib/xcp/guest/"]
let allowed_dom0_directories_for_boot_files = ["/var/lib/xcp/guest/"]

let kernel_path filename =
let ( let* ) = Result.bind in
Expand Down

0 comments on commit 5dc2900

Please sign in to comment.