OpenCloudOS-Kernel/drivers/nfc
Edward Adam Davis 056478b432 nfc/nci: Add the inconsistency check between the input data length and count
[ Upstream commit 068648aab72c9ba7b0597354ef4d81ffaac7b979 ]

write$nci(r0, &(0x7f0000000740)=ANY=[@ANYBLOB="610501"], 0xf)

Syzbot constructed a write() call with a data length of 3 bytes but a count value
of 15, which passed too little data to meet the basic requirements of the function
nci_rf_intf_activated_ntf_packet().

Therefore, increasing the comparison between data length and count value to avoid
problems caused by inconsistent data length and count.

Reported-and-tested-by: syzbot+71bfed2b2bcea46c98f2@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-11 12:49:21 +02:00
..
fdp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-22 18:40:38 -07:00
microread nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
nfcmrvl nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
nxp-nci NFC: nxp: add NXP1002 2023-08-30 18:32:24 -07:00
pn533 nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
pn544 nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
s3fwrn5 nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
st-nci nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
st21nfca nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
st95hf spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
Kconfig nfc: Add a virtual nci device driver 2021-01-29 18:03:33 -08:00
Makefile nfc: Add a virtual nci device driver 2021-01-29 18:03:33 -08:00
mei_phy.c nfc: mei_phy: constify buffer passed to mei_nfc_send() 2021-07-29 12:28:02 +01:00
mei_phy.h nfc: constify nfc_phy_ops 2021-07-25 09:21:21 +01:00
nfcsim.c nfcsim.c: Fix error checking for debugfs_create_dir 2023-05-26 12:18:35 +01:00
port100.c NFC: port100: fix use-after-free in port100_send_complete 2022-03-09 19:59:34 -08:00
trf7970a.c NFC: trf7970a: disable all regulators on removal 2024-05-02 16:32:36 +02:00
virtual_ncidev.c nfc/nci: Add the inconsistency check between the input data length and count 2024-07-11 12:49:21 +02:00