• Andy Lutomirski's avatar
    x86/vm86: Block non-root vm86(old) if mmap_min_addr != 0 · 76fc5e7b
    Andy Lutomirski authored
    vm86 exposes an interesting attack surface against the entry
    code. Since vm86 is mostly useless anyway if mmap_min_addr != 0,
    just turn it off in that case.
    
    There are some reports that vbetool can work despite setting
    mmap_min_addr to zero.  This shouldn't break that use case,
    as CAP_SYS_RAWIO already overrides mmap_min_addr.
    Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
    Cc: Arjan van de Ven <arjan@linux.intel.com>
    Cc: Austin S Hemmelgarn <ahferroin7@gmail.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Josh Boyer <jwboyer@fedoraproject.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Matthew Garrett <mjg59@srcf.ucam.org>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stas Sergeev <stsp@list.ru>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    76fc5e7b
entry_from_vm86.c 5.86 KB