nfc: digital: clamp SENSF_RES length to the destination buffer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8c0695e4998dd268ff2a05951961247b7e015651 · < a56773e649ea99b344d6bbaf90f34c8e3fadef5d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nfc: digital: clamp SENSF_RES length to the destination buffer
digital_in_recv_sensf_res() memcpy()s resp->len bytes from a remote NFC-F device response into the NFC_SENSF_RES_MAXSIZE-byte target.sensf_res field without an upper-bound check. A nearby malicious NFC-F device can send an oversized SENSF_RES response to overflow the stack-local struct nfc_target.
Clamp resp->len to NFC_SENSF_RES_MAXSIZE before the copy.
Found by 0sec automated security-research tooling (https://0sec.ai).
From the CVE record · Linux
The Linux kernel's NFC digital handler copies an NFC-F SENSF_RES response into a fixed-size stack buffer without checking its length. A nearby malicious NFC-F device can send an oversized response and overflow the buffer.
Teams running Linux kernels with the affected NFC digital handler should check their kernel versions.