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:	Sun, 17 Oct 2010 21:50:06 +0400
From:	Vasiliy Kulikov <segooon@...il.com>
To:	Dan Carpenter <error27@...il.com>, Jiri Slaby <jslaby@...e.cz>,
	kernel-janitors@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Alan Cox <alan@...ux.intel.com>, Arnd Bergmann <arnd@...db.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/8] char: synclink: fix information leak to userland

On Sun, Oct 17, 2010 at 19:36 +0200, Dan Carpenter wrote:
> On Sun, Oct 17, 2010 at 07:38:39PM +0400, Vasiliy Kulikov wrote:
> > On Sun, Oct 17, 2010 at 17:34 +0200, Jiri Slaby wrote:
> > > On 10/17/2010 04:41 PM, Vasiliy Kulikov wrote:
> > > > Structure new_line is copied to userland with some padding fields unitialized.
> > > > It leads to leaking of stack memory.
> > > 
> > > I think your tool has a bug. I must admit I fail to see the padding
> > > which would cause leaks. Could you elaborate?
> > 
> > I didn't use any tool except "grep copy_to_user" :)
> > 
> 
> It seems like you should be able to use pahole to make a list of
> structs with padding and then a checker script to find places where
> information is leaked.

Not all of these patches fix only padding zeroing, some of them fix
uninitialized fields.  One struct has partly initialized array.

> Also someone complained to me about when I added a memset() in a fast
> path.

All these cases are ioctl() handlers or similar.  I don't think ioctl()
should be so fast to become significantly slower with single memset().

> The thought was that it might be faster to just initialize it
> instead like:
> 
> 	struct foo bar = {};
> 
> In my case just using the initializer made the code cleaner so I did it,
> but neither of us actually benchmarked it.
> 
> regards,
> dan carpenter
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Thanks,

-- 
Vasiliy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ