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: <54C61FE3.5030001@parallels.com>
Date:	Mon, 26 Jan 2015 14:07:15 +0300
From:	Pavel Emelyanov <xemul@...allels.com>
To:	Herbert Xu <herbert@...dor.apana.org.au>, <netdev@...r.kernel.org>
Subject: Re: udp_diag: Fix socket skipping within chain

On 01/24/2015 12:02 AM, Herbert Xu wrote:
> While working on rhashtable walking I noticed that the UDP diag
> dumping code is buggy.  In particular, the socket skipping within
> a chain never happens, even though we record the number of sockets
> that should be skipped.
> 
> As this code was supposedly copied from TCP, this patch does what
> TCP does and resets num before we walk a chain.
> 
> Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>

Acked-by: Pavel Emelyanov <xemul@...allels.com>

Thanks,
Pavel

> diff --git a/net/ipv4/udp_diag.c b/net/ipv4/udp_diag.c
> index 7927db0..4a000f1 100644
> --- a/net/ipv4/udp_diag.c
> +++ b/net/ipv4/udp_diag.c
> @@ -99,11 +99,13 @@ static void udp_dump(struct udp_table *table, struct sk_buff *skb, struct netlin
>  	s_slot = cb->args[0];
>  	num = s_num = cb->args[1];
>  
> -	for (slot = s_slot; slot <= table->mask; num = s_num = 0, slot++) {
> +	for (slot = s_slot; slot <= table->mask; s_num = 0, slot++) {
>  		struct sock *sk;
>  		struct hlist_nulls_node *node;
>  		struct udp_hslot *hslot = &table->hash[slot];
>  
> +		num = 0;
> +
>  		if (hlist_nulls_empty(&hslot->head))
>  			continue;
>  
> 

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