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: <20180124151643.GR1422@alphalink.fr>
Date:   Wed, 24 Jan 2018 16:16:43 +0100
From:   Guillaume Nault <g.nault@...halink.fr>
To:     Tom Herbert <tom@...ntonium.net>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, rohit@...ntonium.net,
        jchapman@...alix.com
Subject: Re: [PATCH net-next 1/2] kcm: Only allow TCP sockets to be attached
 to a KCM mux

On Tue, Jan 23, 2018 at 05:00:13PM -0800, Tom Herbert wrote:
> TCP sockets for IPv4 and IPv6 that are not listeners or in closed
> stated are allowed to be attached to a KCM mux.
> 
> Fixes: ab7ac4eb9832 ("kcm: Kernel Connection Multiplexor module")
> Reported-by: syzbot+8865eaff7f9acd593945@...kaller.appspotmail.com
> Signed-off-by: Tom Herbert <tom@...ntonium.net>
> ---
>  net/kcm/kcmsock.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
> index d4e98f20fc2a..474ea2200592 100644
> --- a/net/kcm/kcmsock.c
> +++ b/net/kcm/kcmsock.c
> @@ -1391,6 +1391,15 @@ static int kcm_attach(struct socket *sock, struct socket *csock,
>  	if (csk->sk_family == PF_KCM)
>  		return -EOPNOTSUPP;
>  
> +	/* Only allow TCP sockets to be attached for now */
> +	if ((csk->sk_family != AF_INET && csk->sk_family != AF_INET6) ||
> +	    csk->sk_protocol != IPPROTO_TCP)
> +		return -EOPNOTSUPP;
> +
This renders the 'csk->sk_family == PF_KCM' test useless. So why not
removing it?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ