GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
* Re: [PATCH] net/nfc/nci: use memset avoid infoleaks
       [not found] <[email protected]>
@ 2022-03-01  9:34 ` Lv Ruyi
  2022-03-01 10:24   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Lv Ruyi @ 2022-03-01  9:34 UTC (permalink / raw)
  To: krzysztof.kozlowski
  Cc: cgel.zte, chi.minghao, davem, kuba, ammarfaizi2, linux-kernel,
	netdev, zealci, gwml

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. 

thanks
Minghao

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/nfc/nci: use memset avoid infoleaks
  2022-03-01  9:34 ` [PATCH] net/nfc/nci: use memset avoid infoleaks Lv Ruyi
@ 2022-03-01 10:24   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2022-03-01 10:24 UTC (permalink / raw)
  To: Lv Ruyi
  Cc: chi.minghao, davem, ammarfaizi2, kuba, linux-kernel, gwml,
	netdev, zealci

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-01 10:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <[email protected]>
2022-03-01  9:34 ` [PATCH] net/nfc/nci: use memset avoid infoleaks Lv Ruyi
2022-03-01 10:24   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox