mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
While running under CONFIG_FORTIFY_SOURCE=y, syzkaller reported:
memcpy: detected field-spanning write (size 129) of single field "target->sensf_res" at net/nfc/nci/ntf.c:260 (size 18)
This appears to be a legitimate lack of bounds checking in
nci_add_new_protocol(). Add the missing checks.
Reported-by: [email protected]
Link: https://lore.kernel.org/lkml/[email protected]
Fixes: 019c4fbaa7 ("NFC: Add NCI multiple targets support")
Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>