[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <664af071-badf-5cc9-c065-c702b0c8a13d@canonical.com>
Date: Tue, 1 Mar 2022 09:20:08 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>
To: cgel.zte@...il.com
Cc: davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] net/nfc/nci: use memset avoid infoleaks
On 01/03/2022 09:17, cgel.zte@...il.com wrote:
> From: Minghao Chi (CGEL ZTE) <chi.minghao@....com.cn>
>
> Use memset to initialize structs to preventing infoleaks
> in nci_set_config
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@....com.cn>
> ---
> net/nfc/nci/core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
> index d2537383a3e8..32be42be1152 100644
> --- a/net/nfc/nci/core.c
> +++ b/net/nfc/nci/core.c
> @@ -641,6 +641,7 @@ int nci_set_config(struct nci_dev *ndev, __u8 id, size_t len, const __u8 *val)
> if (!val || !len)
> return 0;
>
> + memset(¶m, 0x0, sizeof(param));
> param.id = id;
> param.len = len;
> param.val = val;
The entire 'param' is overwritten in later code, so what could leak here?
Best regards,
Krzysztof
Powered by blists - more mailing lists