linux/drivers/nfc
Thadeu Lima de Souza Cascardo df2033acf2 Revert "nfc/nci: Add the inconsistency check between the input data length and count"
commit f40ddcc0c0 upstream.

This reverts commit 068648aab7.

NFC packets may have NUL-bytes. Checking for string length is not a correct
assumption here. As long as there is a check for the length copied from
copy_from_user, all should be fine.

The fix only prevented the syzbot reproducer from triggering the bug
because the packet is not enqueued anymore and the code that triggers the
bug is not exercised.

The fix even broke
testing/selftests/nci/nci_dev, making all tests there fail. After the
revert, 6 out of 8 tests pass.

Fixes: 068648aab7 ("nfc/nci: Add the inconsistency check between the input data length and count")
Cc: stable@vger.kernel.org
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Link: https://patch.msgid.link/20260113202458.449455-1-cascardo@igalia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-30 10:28:40 +01:00
..
fdp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-22 18:40:38 -07:00
microread nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-20 19:28:31 -07:00
nfcmrvl move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
nxp-nci move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
pn533 nfc: pn533: Fix error code in pn533_acr122_poweron_rdr() 2026-01-08 10:14:01 +01:00
pn544 move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
s3fwrn5 nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-20 19:28:31 -07:00
st-nci nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-20 19:28:31 -07:00
st21nfca nfc: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-06-20 19:28:31 -07:00
st95hf nfc: st95hf: drop driver owner assignment 2024-03-29 12:32:51 -07: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-04-22 14:19:58 -07:00
virtual_ncidev.c Revert "nfc/nci: Add the inconsistency check between the input data length and count" 2026-01-30 10:28:40 +01:00