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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 26 Jun 2017 19:46:58 -0700
From:   Joe Perches <joe@...ches.com>
To:     "Gustavo A. R. Silva" <garsilva@...eddedor.com>,
        Pablo Neira Ayuso <pablo@...filter.org>,
        Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
        Florian Westphal <fw@...len.de>,
        "David S. Miller" <davem@...emloft.net>,
        Alexey Kuznetsov <kuznet@....inr.ac.ru>,
        James Morris <jmorris@...ei.org>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Patrick McHardy <kaber@...sh.net>
Cc:     netfilter-devel@...r.kernel.org, coreteam@...filter.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netfilter: ip_tables: remove useless variable
 assignment in get_info()

On Mon, 2017-06-26 at 17:34 -0500, Gustavo A. R. Silva wrote:
> Value assigned to variable _ret_ at line 970 is overwritten either at
> line 986 or 988, before it can be used. This makes such variable
> assignment useless.
> 
> Addresses-Coverity-ID: 1226932
[]
> diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
[]
> @@ -967,7 +967,7 @@ static int get_info(struct net *net, void __user *user,
>  		struct xt_table_info tmp;
>  
>  		if (compat) {
> -			ret = compat_table_info(private, &tmp);
> +			compat_table_info(private, &tmp);

why isn't it more appropriate to test the return value?

>  			xt_compat_flush_offsets(AF_INET);
>  			private = &tmp;
>  		}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ