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]
Message-Id: <20181221.090848.620702111696913649.davem@davemloft.net>
Date:   Fri, 21 Dec 2018 09:08:48 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     vakul.garg@....com
Cc:     netdev@...r.kernel.org, borisp@...lanox.com, aviadye@...lanox.com,
        davejwatson@...com, doronrk@...com
Subject: Re: [PATCH net-next] tls: Do not call sk_memcopy_from_iter with
 zero length

From: Vakul Garg <vakul.garg@....com>
Date: Fri, 21 Dec 2018 15:16:52 +0000

> @@ -943,10 +943,12 @@ int tls_sw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
>  				    tls_ctx->tx.overhead_size);
>  		}
>  
> -		ret = sk_msg_memcopy_from_iter(sk, &msg->msg_iter, msg_pl,
> -					       try_to_copy);
> -		if (ret < 0)
> -			goto trim_sgl;
> +		if (try_to_copy) {
> +			ret = sk_msg_memcopy_from_iter(sk, &msg->msg_iter,
> +						       msg_pl, try_to_copy);
> +			if (ret < 0)
> +				goto trim_sgl;
> +		}

This leaves 'ret' uninitialized, and the code below here uses it's
value.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ