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]
Date:	Mon, 15 Oct 2012 08:57:12 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Jiri Pirko <jiri@...nulli.us>
Cc:	Jiri Pirko <jpirko@...hat.com>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] sock filter: fix copy of filter from userspace

On Sat, 13 Oct 2012 21:19:49 +0200
Jiri Pirko <jiri@...nulli.us> wrote:

> Sat, Oct 13, 2012 at 08:40:32PM CEST, shemminger@...tta.com wrote:
> >The sk_unattached_filter_create function is passed a socket
> >filter structure and the copies the contents of the filter from
> >userspace. Sparse detected that this code was incorrectly using
> >memcpy when it needed to use copy_from_user instead.
> 
> Hmm. fprog->filter is in this case allocated and filled in kernel.
> So memcpy is good.
> 
> Not sure how to handle this correctly. Either we remove "__user" or we
> redefine "struct sock_fprog" for sk_unattached_filter_create() use.
> 
> Any thoughts?

Or define a different structure for kernel usage versus userspace API.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ