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:	Wed, 4 Jun 2014 18:01:31 +0200
From:	Jiri Benc <jbenc@...hat.com>
To:	Network Development <netdev@...r.kernel.org>
Cc:	Andy Lutomirski <luto@...capital.net>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Daniel Borkmann <dborkman@...hat.com>
Subject: Re: [PATCH urgent] netlink: Only check file credentials for
 implicit destinations

On Fri, 30 May 2014 11:04:00 -0700, Andy Lutomirski wrote:
> --- a/net/netlink/af_netlink.c
> +++ b/net/netlink/af_netlink.c
> @@ -1373,7 +1373,9 @@ retry:
>  bool __netlink_ns_capable(const struct netlink_skb_parms *nsp,
>  			struct user_namespace *user_ns, int cap)
>  {
> -	return sk_ns_capable(nsp->sk, user_ns, cap);
> +	return ((nsp->flags & NETLINK_SKB_DST) ||
> +		file_ns_capable(nsp->sk->sk_socket->file, user_ns, cap)) &&
> +		ns_capable(user_ns, cap);

Sorry if I'm missing something. Is socket->file valid (non-NULL) in
kernel->kernel netlink communication? I don't think it's assigned for
sockets created by netlink_kernel_create, is it? Seems this would cause
NULL ptr dereference.

But then, I don't even know whether kernel->kernel netlink
communication is allowed.

(I'm aware that if this is really the case the NULL ptr deref is not
caused by this patch but by the one this is fixing.)

Thanks,

 Jiri

-- 
Jiri Benc
--
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