net: nfc: nci: Increase NCI_DATA_TIMEOUT to 3000 ms
Subsystems (3)
PATCH v3 1/1 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.
---
v3:
- introduce no parameter and raise the timeout unconditionally
v2: https://lore.kernel.org/netdev/[email protected]/
- export nci_data_timeout to survive make allmodconfig
v1: https://lore.kernel.org/netdev/[email protected]/
include/net/nfc/nci_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/nfc/nci_core.h +1 -1
@@ -52,7 +52,7 @@ enum nci_state {#define NCI_RF_DISC_SELECT_TIMEOUT 5000#define NCI_RF_DEACTIVATE_TIMEOUT 30000#define NCI_CMD_TIMEOUT 5000 -#define NCI_DATA_TIMEOUT 700 +#define NCI_DATA_TIMEOUT 3000struct nci_dev ;
Signature · 1 line
2.47.2
Quoted 7 lines · Juraj Šarinay
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).
Quoted 6 lines
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 <[email protected]>---
v3:
Thanks!
Best regards,
Krzysztof
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Tue, 2 Sep 2025 13:36:28 +0200 you wrote:
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).[...]
Here is the summary with links:
- [net-next,v3] net: nfc: nci: Increase NCI_DATA_TIMEOUT to 3000 ms
https://git.kernel.org/netdev/net-next/c/21f82062d0f2
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html