[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] libelf: Handle PVH kernels lacking ENTRY elfnote


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 15 Oct 2020 18:27:13 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 15 Oct 2020 17:27:40 +0000
  • Ironport-sdr: MZD92vvaZdoGFRWDDsfQCD+rR3JriCQkBt78e42NYxr4Cuk8raootnvOnVdIbDoVx1A5jsdX8E pdwAenzQeVqSfyeXj+9tQ7vpgPl+EzOrA6k19rjmevqIecNheJ+TqlpZ4sylLxupQVr4xXqQXZ 2H8pTFspZdC/RycWSiWnR8t84I/gXl8AFcUxmyokJ09HkH2fpbpTxRcnDzS/njBWUlT4PsXrXT 52rqndaBFUffWSaKEvdfLHR/O49nxma4/t263WZTyEzjv5AxueECAYtVTwkiXACb/N/0vogOUI K+0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15/10/2020 16:14, Jan Beulich wrote:
> On 15.10.2020 16:50, Jason Andryuk wrote:
>> On Thu, Oct 15, 2020 at 3:00 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>> And why is there no bounds check of ->phys_entry paralleling the
>>> ->virt_entry one?
>> What is the purpose of this checking?  It's sanity checking which is
>> generally good, but what is the harm from failing the checks?  A
>> corrupt kernel can crash itself?  Maybe you could start executing
>> something (the initramfs?) instead of the actual kernel?
> This is at least getting close to a possible security issue.
> Booting a hacked up binary can be a problem afaik.

It's only a security issue if the absence of the check is going to cause
a malfunction outside of guest the guest context.  (e.g. in the
toolstack's elf parser)

There are a functionally infinite ways for a guest kernel to crash
itself early on boot - malforming the ELF header such that the state of
the guest once executing doesn't boot isn't interesting from this point
of view.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.