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: <bf1d0734-d73a-83e9-c8e5-0fa4d447bc51@gmail.com>
Date:   Fri, 5 Oct 2018 06:52:17 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     David Howells <dhowells@...hat.com>, netdev@...r.kernel.org
Cc:     linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 2/2] rxrpc: Fix the data_ready handler



On 10/05/2018 06:43 AM, David Howells wrote:
> Fix the rxrpc_data_ready() function to pick up all packets and to not miss
> any.  There are two problems:
> 


> +	for (;;) {
> +		skb = skb_recv_udp(udp_sk, 0, 1, &ret);
> +		if (!skb) {
> +			if (ret == -EAGAIN)
> +				return;
> +
> +			/* If there was a transmission failure, we get an error
> +			 * here that we need to ignore.
> +			 */
> +			_debug("UDP socket error %d", ret);
> +			continue;
> +		}
> +
> +		rxrpc_new_skb(skb, rxrpc_skb_rx_received);
> +
> +		/* we'll probably need to checksum it (didn't call sock_recvmsg) */
> +		if (skb_checksum_complete(skb)) {
> +			rxrpc_free_skb(skb, rxrpc_skb_rx_freed);
> +			__UDP_INC_STATS(sock_net(udp_sk), UDP_MIB_INERRORS, 0);
> +			_debug("csum failed");
> +			continue;
> +		}
> +
> +		__UDP_INC_STATS(sock_net(udp_sk), UDP_MIB_INDATAGRAMS, 0);
> +
> +		rxrpc_input_packet(udp_sk, skb);
> +	}
> +}


This looks a potential infinite loop to me ?

If not, please add a comment explaining why there is no apparent limit.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ