Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 538912 - Invalid instruction in /sbin/init with XEN domU PVH hardened
Summary: Invalid instruction in /sbin/init with XEN domU PVH hardened
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-05 10:08 UTC by Zoltán Halassy
Modified: 2018-10-12 01:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xl and kernel output (xen.log,17.98 KB, text/x-log)
2015-02-05 10:08 UTC, Zoltán Halassy
Details
dom0 config (config-dom0,80.28 KB, text/plain)
2015-02-05 10:10 UTC, Zoltán Halassy
Details
domU config (config-domU,53.41 KB, text/plain)
2015-02-05 10:12 UTC, Zoltán Halassy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltán Halassy 2015-02-05 10:08:29 UTC
Created attachment 395582 [details]
xl and kernel output

Installed packages:

=app-emulation/xen-4.5.0
=app-emulation/xen-tools-4.5.0
=sys-kernel/hardened-sources-3.17.7-r1

When pvh=1 is set in the domU config, the kernel boots, mounts the rootfs, but cannot execute init. Tried binaries from the local system, and also generic ones from stage3. chrooting to the rootfs works (no invalid instruction). starting the kernel without pvh (as pv) also works. 

The relevant error message in the kernel dmesg is:

traps: init[1] trap invalid opcode ip:6be00f370631 sp:7b786b1464c0 error:0 in ld-2.19.so[6be00f359000+22000]
grsec: Illegal instruction occurred at 00006be00f370631 in /sbin/init[init:1] uid/euid:0/0 gid/egid:0/0, parent /[swapper/0:0] uid/euid:0/0 gid/egid:0/0

Processor is an "Intel(R) Xeon(R) CPU           X3430  @ 2.40GHz"
Comment 1 Zoltán Halassy 2015-02-05 10:10:23 UTC
Created attachment 395584 [details]
dom0 config
Comment 2 Zoltán Halassy 2015-02-05 10:12:18 UTC
Created attachment 395586 [details]
domU config
Comment 3 Yixun Lan archtester gentoo-dev 2015-02-16 06:34:29 UTC
did you try xen-4.4.x, have the same problem?
Comment 4 Zoltán Halassy 2015-02-16 09:26:38 UTC
Did not try with 4.4 yet. PVH support was experimental in that, but I will give it a try as soon as I can then.
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2015-02-27 03:21:10 UTC
can you test with a grsec stuff under the security section of menuconfig disabled?
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2015-02-27 05:53:45 UTC
well, can you clarify, are you booting the guest with the same or similar kernel as the host?  It seems implied but I want to know if you're running a host on a std kernel and trying to boot a guest with a hardened kernel which is entirely feasible.  This was replicated using xen-4.1 as a host and the guest booted fine