• Michal Luczaj's avatar
    KVM: x86: emulator: Fix illegal LEA handling · 4ac5b423
    Michal Luczaj authored
    The emulator mishandles LEA with register source operand. Even though such
    LEA is illegal, it can be encoded and fed to CPU. In which case real
    hardware throws #UD. The emulator, instead, returns address of
    x86_emulate_ctxt._regs. This info leak hurts host's kASLR.
    
    Tell the decoder that illegal LEA is not to be emulated.
    Signed-off-by: default avatarMichal Luczaj <mhal@rbox.co>
    Message-Id: <20220729134801.1120-1-mhal@rbox.co>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    4ac5b423
emulate.c 149 KB