lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 29 Apr 2022 20:00:37 +0800
From:   Lai Jiangshan <jiangshanlai@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     X86 ML <x86@...nel.org>, Josh Poimboeuf <jpoimboe@...hat.com>,
        Brian Gerst <brgerst@...il.com>,
        Andrew Cooper <Andrew.Cooper3@...rix.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] x86,entry: Use PUSH_AND_CLEAR_REGS for compat

On Fri, Apr 29, 2022 at 5:13 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
>
> Since the upper regs don't exist for ia32 code, preserving them
> doesn't hurt and it simplifies the code.
>
> If there was any attack surface on this, that attack surface already
> exists for INT80 and needs to be otherwise dealt with.
>
> Notably:
>
>  - SYSENTER: didn't clear si, dx, cx.
>  - SYSCALL, INT80: *do* clear si since the C functions don't take a
>    second argument.
>

If CLEAR_REGS for SYSCALL, INT80 clears si, it is better, IMO, to
make CLEAR_REGS clear si unconditionally.

SYSCALL, INT80 will explicitly clear si via calling
syscall_enter_from_user_mode().

But some handlers called from the macro idtentry don't clear
si explicitly, although it is likely to be cleared.

So if %rsi is a concern for SYSCALL, INT80, please make CLEAR_REGS
clear %rsi unconditionally.

Thanks
Lai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ