[PATCH] net: fddi: skfp: Uninitialized data

Alexander Sapozhnikov posted 1 patch 2 years ago
drivers/net/fddi/skfp/pmf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] net: fddi: skfp: Uninitialized data
Posted by Alexander Sapozhnikov 2 years ago
Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Alexander Sapozhnikov <alsp705@gmail.com>
---
 drivers/net/fddi/skfp/pmf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/fddi/skfp/pmf.c b/drivers/net/fddi/skfp/pmf.c
index 563fb7f0b327..3f24fbd82a73 100644
--- a/drivers/net/fddi/skfp/pmf.c
+++ b/drivers/net/fddi/skfp/pmf.c
@@ -1084,7 +1084,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index,
 	int		path ;
 	int		port ;
 	SK_LOC_DECL(u_char,byte_val) ;
-	SK_LOC_DECL(u_short,word_val) ;
+	SK_LOC_DECL(u_short, word_val) = 0 ;
 	SK_LOC_DECL(u_long,long_val) ;
 
 	mac = index - INDEX_MAC ;
-- 
2.40.1
Re: [PATCH] net: fddi: skfp: Uninitialized data
Posted by Simon Horman 2 years ago
On Tue, Dec 19, 2023 at 01:08:19PM +0300, Alexander Sapozhnikov wrote:
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Signed-off-by: Alexander Sapozhnikov <alsp705@gmail.com>

Hi,

I think that more explanation is required regarding the problem
this solves and how it might affect users.

> ---
>  drivers/net/fddi/skfp/pmf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/fddi/skfp/pmf.c b/drivers/net/fddi/skfp/pmf.c
> index 563fb7f0b327..3f24fbd82a73 100644
> --- a/drivers/net/fddi/skfp/pmf.c
> +++ b/drivers/net/fddi/skfp/pmf.c
> @@ -1084,7 +1084,7 @@ static int smt_set_para(struct s_smc *smc, struct smt_para *pa, int index,
>  	int		path ;
>  	int		port ;
>  	SK_LOC_DECL(u_char,byte_val) ;
> -	SK_LOC_DECL(u_short,word_val) ;
> +	SK_LOC_DECL(u_short, word_val) = 0 ;
>  	SK_LOC_DECL(u_long,long_val) ;
>  
>  	mac = index - INDEX_MAC ;
> -- 
> 2.40.1
> 
>