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

Re: [Xen-devel] [PATCH 3/4] x86emul: drop pointless and add useful default cases



>>> On 23.06.16 at 12:44, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 20/06/16 12:58, Jan Beulich wrote:
>> @@ -3845,10 +3834,11 @@ x86_emulate(
>>              goto push;
>>          case 7:
>>              generate_exception_if(1, EXC_UD, -1);
>> -        default:
>> -            goto cannot_emulate;
>>          }
>>          break;
>> +
>> +    default:
>> +        BUG();
> 
> These introduce DoS vulnerabilities if there is indeed a path to default.
> 
> Could I recommend instead a one-time printk() dumping the instruction
> stream which lead to here, an ASSERT_UNREACHABLE(), and a goto
> cannot_emulate?
> 
> That way, a production build won't crash.

Good point, will do.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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