lkml.org 
[lkml]   [2022]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net/nfc/nci: use memset avoid infoleaks
From
On 01/03/2022 09:20, Krzysztof Kozlowski wrote:
> On 01/03/2022 09:17, cgel.zte@gmail.com wrote:
>> From: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
>>
>> Use memset to initialize structs to preventing infoleaks
>> in nci_set_config
>>
>> Reported-by: Zeal Robot <zealci@zte.com.cn>

One more thing. This report seems to be hidden, not public. Reported-by
tag means someone reported something and you want to give credits for
that. Using internal tool in a hidden, secret, non-public way does not
fit open-source collaboration method.

What is more: the email is invalid. "User unknown id"

>> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.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(&param, 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


Best regards,
Krzysztof

\
 
 \ /
  Last update: 2022-03-01 09:34    [W:0.221 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site