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>] [day] [month] [year] [list]
Message-ID: <1479090434.3755.4.camel@decadent.org.uk>
Date:   Mon, 14 Nov 2016 02:27:14 +0000
From:   Ben Hutchings <ben@...adent.org.uk>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Alexander Levin <alexander.levin@...izon.com>
Cc:     stable <stable@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        akpm@...ux-foundation.org, Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH 3.16 296/346] fix minor infoleak in get_user_ex()

On Sun, 2016-11-13 at 18:14 -0800, Linus Torvalds wrote:
> No, this is no good.
> 
> I had a slightly different version of this that is OK for older
> kernels.

And I thought I'd dropped this after you mentioned the problem at
Kernel Summit.  Thanks for checking.

Sasha, this still needs to be reverted in 3.18 and 4.1 stable branches.

Ben.

>      Linus
> 
> On Nov 13, 2016 6:04 PM, "Ben Hutchings" <ben@...adent.org.uk> wrote:
> 
> > 3.16.39-rc1 review patch.  If anyone has any objections, please let me
> > know.
> > 
> > ------------------
> > 
> > From: Al Viro <viro@...IV.linux.org.uk>
> > 
> > commit 1c109fabbd51863475cd12ac206bdd249aee35af upstream.
> > 
> > get_user_ex(x, ptr) should zero x on failure.  It's not a lot of a leak
> > (at most we are leaking uninitialized 64bit value off the kernel stack,
> > and in a fairly constrained situation, at that), but the fix is trivial,
> > so...
> > 
> > > Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
> > [ This sat in different branch from the uaccess fixes since mid-August ]
> > Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
> > Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
> > ---
> >  arch/x86/include/asm/uaccess.h | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> > 
> > --- a/arch/x86/include/asm/uaccess.h
> > +++ b/arch/x86/include/asm/uaccess.h
> > @@ -391,7 +391,11 @@ do {
> >                      \
> >  #define __get_user_asm_ex(x, addr, itype, rtype, ltype)
> >       \
> >         asm volatile("1:        mov"itype" %1,%"rtype"0\n"              \
> >                      "2:\n"                                             \
> > -                    _ASM_EXTABLE_EX(1b, 2b)                            \
> > +                    ".section .fixup,\"ax\"\n"                         \
> > +                     "3:xor"itype" %"rtype"0,%"rtype"0\n"              \
> > +                    "  jmp 2b\n"                                       \
> > +                    ".previous\n"                                      \
> > +                    _ASM_EXTABLE_EX(1b, 3b)                            \
> >                      : ltype(x) : "m" (__m(addr)))
> > 
> >  #define __put_user_nocheck(x, ptr, size)                       \
> > 
> > 
-- 
Ben Hutchings
If more than one person is responsible for a bug, no one is at fault.


Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ