aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-debug.h
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2023-02-15 14:41:14 -0800
committerJohannes Berg <[email protected]>2023-02-16 09:33:25 +0100
commit1a30a6b25f263686dbf2028d56041ac012b10dcb (patch)
treed2542e74dc9636b0a55886828a5e3286e025dda5 /drivers/usb/cdns3/cdns3-debug.h
parent3caf31e7b18a90b74a2709d761a0dfa423f2c2e4 (diff)
wifi: brcmfmac: p2p: Introduce generic flexible array frame member
Silence run-time memcpy() false positive warning when processing management frames: memcpy: detected field-spanning write (size 27) of single field "&mgmt_frame->u" at drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1469 (size 26) Due to this (soon to be fixed) GCC bug[1], FORTIFY_SOURCE (via __builtin_dynamic_object_size) doesn't recognize that the union may end with a flexible array, and returns "26" (the fixed size of the union), rather than the remaining size of the allocation. Add an explicit flexible array member and set it as the destination here, so that we get the correct coverage for the memcpy(). [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101832 Reported-by: Ard Biesheuvel <[email protected]> Cc: Arend van Spriel <[email protected]> Cc: Franky Lin <[email protected]> Cc: Hante Meuleman <[email protected]> Cc: Kalle Valo <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Paolo Abeni <[email protected]> Cc: Johannes Berg <[email protected]> Cc: "Jason A. Donenfeld" <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: "Darrick J. Wong" <[email protected]> Cc: Colin Ian King <[email protected]> Cc: Brian Henriquez <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] [rename 'frame' to 'body'] Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions