android_kernel_motorola_sm6375/net/nfc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kees Cook 6778434706 NFC: nci: Bounds check struct nfc_target arrays
[ Upstream commit e329e71013c9b5a4535b099208493c7826ee4a64 ]

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]>
Signed-off-by: Sasha Levin <[email protected]>
2022-12-14 11:30:46 +01:00
..
hci
nci NFC: nci: Bounds check struct nfc_target arrays 2022-12-14 11:30:46 +01:00
af_nfc.c nfc: fix error handling of nfc_proto_register() 2021-10-20 11:40:16 +02:00
core.c NFC: NULL out the dev->rfkill to prevent UAF 2022-06-14 18:11:33 +02:00
digital.h
digital_core.c NFC: digital: fix possible memory leak in digital_tg_listen_mdaa() 2021-10-20 11:40:16 +02:00
digital_dep.c
digital_technology.c NFC: digital: fix possible memory leak in digital_in_send_sdd_req() 2021-10-20 11:40:16 +02:00
Kconfig
llcp.h
llcp_commands.c
llcp_core.c
llcp_sock.c nfc: llcp: fix NULL error pointer dereference on sendmsg() after failed bind() 2022-01-27 09:19:26 +01:00
Makefile
netlink.c NFC: netlink: fix sleep in atomic bug when firmware download timeout 2022-05-12 12:23:44 +02:00
nfc.h
rawsock.c net/nfc/rawsock.c: fix a permission check bug 2021-06-16 11:59:33 +02:00