2022-03-01 11:12:50

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] net/nfc/nci: use memset avoid infoleaks

On 01/03/2022 10:34, Lv Ruyi wrote:
> hello sir
>
> I think this way: On 64-bit systems, struct nci_set_config_param has
> an added padding of 7 bytes between struct members id and len. Even
> though all struct members are initialized, the 7-byte hole will
> contain data from the kernel stack.
>

That's reasonable. This explanation should be mentioned in the commit
msg. Also just initialize the array to 0, instead of separate memset call.


Best regards,
Krzysztof