android_kernel_motorola_sm6375/net/nfc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lin Ma e00b42cbec nfc/nci: fix race with opening and closing
[ Upstream commit 0ad6bded175e829c2ca261529c9dce39a32a042d ]

Previously we leverage NCI_UNREG and the lock inside nci_close_device to
prevent the race condition between opening a device and closing a
device. However, it still has problem because a failed opening command
will erase the NCI_UNREG flag and allow another opening command to
bypass the status checking.

This fix corrects that by making sure the NCI_UNREG is held.

Reported-by: syzbot+43475bf3cfbd6e41f5b7@syzkaller.appspotmail.com
Fixes: 48b71a9e66c2 ("NFC: add NCI_UNREG flag to eliminate the race")
Signed-off-by: Lin Ma <linma@zju.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:22:58 +01:00
..
hci
nci nfc/nci: fix race with opening and closing 2022-12-08 11:22:58 +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