qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [BUG] user-to-root privesc inside VM via bad translatio


From: Pranith Kumar
Subject: Re: [Qemu-devel] [BUG] user-to-root privesc inside VM via bad translation caching
Date: Wed, 22 Mar 2017 12:29:58 -0400

On Wed, Mar 22, 2017 at 11:21 AM, Peter Maydell
<address@hidden> wrote:
> On 22 March 2017 at 15:14, Pranith Kumar <address@hidden> wrote:
>> On Wed, Mar 22, 2017 at 11:04 AM, Peter Maydell
>> <address@hidden> wrote:
>>> This doesn't look right because it means we'll check
>>> only after we've emitted all the code to do the
>>> instruction operation, so the effect will be
>>> "execute instruction, then take illegal-opcode
>>> exception".
>
>> The pc is restored to original address (s->pc = pc_start), so the
>> exception will overwrite the generated illegal instruction and will be
>> executed first.
>
> s->pc is the guest PC -- moving that backwards will
> not do anything about the generated TCG IR that's
> already been written. You'd need to rewind the
> write pointer in the IR stream, which there is
> no support for doing AFAIK.

Ah, OK. Thanks for the explanation. May be we should check the size of
the instruction while decoding the prefixes and error out once we
exceed the limit. We would not generate any IR code.

--
Pranith



reply via email to

[Prev in Thread] Current Thread [Next in Thread]