lkml.org 
[lkml]   [2023]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] wifi: iwlwifi: dvm: Add struct_group for struct iwl_keyinfo keys
On Sat, Feb 18, 2023 at 11:11:00AM -0800, Kees Cook wrote:
> Function iwlagn_send_sta_key() was trying to write across multiple
> structure members in a single memcpy(). Add a struct group "keys" to
> let the compiler see the intended bounds of the memcpy, which includes
> the tkip keys as well. Silences false positive memcpy() run-time
> warning:
>
> memcpy: detected field-spanning write (size 32) of single field "sta_cmd.key.key" at drivers/net/wireless/intel/iwlwifi/dvm/sta.c:1103 (size 16)
>
> Link: https://www.alionet.org/index.php?topic=1469.0
> Cc: Gregory Greenman <gregory.greenman@intel.com>
> Cc: Kalle Valo <kvalo@kernel.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
> Cc: Johannes Berg <johannes.berg@intel.com>
> Cc: Benjamin Berg <benjamin.berg@intel.com>
> Cc: Sriram R <quic_srirrama@quicinc.com>
> Cc: linux-wireless@vger.kernel.org
> Cc: netdev@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>

Reviewed-by: Simon Horman <simon.horman@corigine.com>

\
 
 \ /
  Last update: 2023-03-27 00:28    [W:0.844 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site