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] [day] [month] [year] [list]
Message-Id: <20170804092017.GA3278@osiris>
Date:   Fri, 4 Aug 2017 11:20:17 +0200
From:   Heiko Carstens <heiko.carstens@...ibm.com>
To:     Thomas Huth <huth@...family.org>
Cc:     sohu0106 <sohu0106@....com>, schwidefsky@...ibm.com,
        linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: drivers/s390/char/keyboard.c kernel stack infoleak

On Fri, Aug 04, 2017 at 11:09:24AM +0200, Thomas Huth wrote:
>  Hi,
> 
> On 03.08.2017 15:59, sohu0106 wrote:
> > 
> > The stack object "kbdiacr" has a total size of 4 bytes. Its last 1 bytes are padding bytes after "result" which are not initialized and leaked to userland via "copy_to_user".
> > 
> > 
> > diff --git a/keyboard.c b/keyboard.c
> > index ba0e4f9..76a6d35 100644
> > --- a/keyboard.c
> > +++ b/keyboard.c
> > @@ -480,6 +480,8 @@ int kbd_ioctl(struct kbd_data *kbd, unsigned int cmd, unsigned long arg)
> >                 struct kbdiacr diacr;
> >                 int i;
> >  
> > +               memset( &diacr, 0, sizeof(struct kbdiacr) );
> > +
> 
> I think it would be nicer to simply init the struct with "= {}"
> directly, i.e.:
> 
> 		struct kbdiacr diacr = {};
> 
> And by the way, please have a look at the kernel patch submission
> guidelines first, especially the COO part here:

The patch doesn't make sense. There is no padding and therefore no
information leak.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ