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-next>] [day] [month] [year] [list]
Message-ID: <20240624110915.GF29266@unreal>
Date: Mon, 24 Jun 2024 14:09:15 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Dan Carpenter <dan.carpenter@...aro.org>,
	Tariq Toukan <tariqt@...dia.com>
Cc: Vlad Buslov <vladbu@...dia.com>, linux-rdma@...r.kernel.org,
	linux-netdev <netdev@...r.kernel.org>,
	Paul Blakey <paulb@...dia.com>, Chris Mi <cmi@...dia.com>
Subject: Re: [bug report] net/mlx5e: Implement CT entry update

On Thu, Jun 20, 2024 at 11:50:33AM +0300, Dan Carpenter wrote:
> Hello Vlad Buslov,
> 
> Commit 94ceffb48eac ("net/mlx5e: Implement CT entry update") from Dec
> 1, 2022 (linux-next), leads to the following Smatch static checker
> warning:
> 
> 	drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c:1163 mlx5_tc_ct_entry_replace_rules()
> 	error: uninitialized symbol 'err'.

This error was introduced by the patch 49d37d05f216 ("net/mlx5: CT: Separate CT and CT-NAT tuple entries")
https://lore.kernel.org/all/20240613210036.1125203-3-tariqt@nvidia.com/

Thanks

> 
> drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
>     1142 static int
>     1143 mlx5_tc_ct_entry_replace_rules(struct mlx5_tc_ct_priv *ct_priv,
>     1144                                struct flow_rule *flow_rule,
>     1145                                struct mlx5_ct_entry *entry,
>     1146                                u8 zone_restore_id)
>     1147 {
>     1148         int err;
>     1149 
>     1150         if (mlx5_tc_ct_entry_in_ct_table(entry)) {
>     1151                 err = mlx5_tc_ct_entry_replace_rule(ct_priv, flow_rule, entry, false,
>     1152                                                     zone_restore_id);
>     1153                 if (err)
>     1154                         return err;
>     1155         }
>     1156 
>     1157         if (mlx5_tc_ct_entry_in_ct_nat_table(entry)) {
>     1158                 err = mlx5_tc_ct_entry_replace_rule(ct_priv, flow_rule, entry, true,
>     1159                                                     zone_restore_id);
>     1160                 if (err && mlx5_tc_ct_entry_in_ct_table(entry))
>     1161                         mlx5_tc_ct_entry_del_rule(ct_priv, entry, false);
>     1162         }
> 
> Can the entry not be in either table?
> 
> --> 1163         return err;
> 
> If so then err is uninitialized.
> 
>     1164 }
> 
> regards,
> dan carpenter
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ