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:   Tue, 3 Jan 2017 08:41:50 -0800
From:   Dave Hansen <dave.hansen@...ux.intel.com>
To:     Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
        Andy Lutomirski <luto@...capital.net>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...e.de>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        X86 ML <x86@...nel.org>, linux-msdos@...r.kernel.org,
        wine-devel@...ehq.org, Adam Buchbinder <adam.buchbinder@...il.com>,
        Colin Ian King <colin.king@...onical.com>,
        Lorenzo Stoakes <lstoakes@...il.com>,
        Qiaowei Ren <qiaowei.ren@...el.com>,
        "Ravi V . Shankar" <ravi.v.shankar@...el.com>
Subject: Re: [v2 2/7] x86/mpx: Fail when implicit zero-displacement is used
 along with R/EBP

On 12/27/2016 02:33 PM, Ricardo Neri wrote:
>>> diff --git a/arch/x86/mm/mpx.c b/arch/x86/mm/mpx.c
>>> index 6a75a75..71681d0 100644
>>> --- a/arch/x86/mm/mpx.c
>>> +++ b/arch/x86/mm/mpx.c
>>> @@ -120,6 +120,13 @@ static int get_reg_offset(struct insn *insn, struct pt_regs *regs,
>>>
>>>         case REG_TYPE_BASE:
>>>                 regno = X86_SIB_BASE(insn->sib.value);
>>> +               if (regno == 5 && X86_MODRM_RM(insn->modrm.value) == 0) {
>>> +                       WARN_ONCE(1, "An explicit displacement is required when %sBP used as SIB base.",
>>> +                                 (IS_ENABLED(CONFIG_X86_64) && insn->x86_64) ?
>>> +                                 "R13 or R" : "E");
>>> +                       return -EINVAL;
>>> +               }
>>> +
>> Now that I've read the cover letter, I see what's going on.  This
>> should not warn -- user code can easily trigger this deliberately.
> OK, I'll remove it. Are you concerned about the warning printing the
> calltrace, even only once?

Yes.  We don't let userspace spam the kernel, even once.  If we have a
couple thousand "only once" places, then userspace can overwhelm the
kernel log.

Also, this needs a much better description of what's going on in the
code.  Could you add a comment explaining what's going on, and why
regno==5, etc...?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ