]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: nfc: nci: Increase NCI_DATA_TIMEOUT to 3000 ms
authorJuraj Šarinay <juraj@sarinay.com>
Tue, 2 Sep 2025 11:36:28 +0000 (13:36 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Sep 2025 00:02:12 +0000 (17:02 -0700)
commit21f82062d0f241e55dd59eb630e8710862cc90b4
tree49b5786082010b1122d6e407e01b7ea937e514e1
parent648d628db536adfd8ae5e61b7a82908af8683918
net: nfc: nci: Increase NCI_DATA_TIMEOUT to 3000 ms

An exchange with a NFC target must complete within NCI_DATA_TIMEOUT.
A delay of 700 ms is not sufficient for cryptographic operations on smart
cards. CardOS 6.0 may need up to 1.3 seconds to perform 256-bit ECDH
or 3072-bit RSA. To prevent brute-force attacks, passports and similar
documents introduce even longer delays into access control protocols
(BAC/PACE).

The timeout should be higher, but not too much. The expiration allows
us to detect that a NFC target has disappeared.

Signed-off-by: Juraj Šarinay <juraj@sarinay.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250902113630.62393-1-juraj@sarinay.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/nfc/nci_core.h