A malicious or counterfeit sensor module, or an attacker who tampers with the UART wiring, can reply to any driver command with a header that declares a length of up to 65535 bytes. The ISR then writes that many attacker-supplied bytes past the end of the stack buffer. The existing length check in r502a_validate_rx_packet() runs only after the data has been written, so it does not prevent the overflow. Every sensor transaction is affected, including the ones issued by fps_init() during device initialization.
The result is a stack overwrite with attacker-controlled length and content in the calling thread. This can corrupt control data and may lead to arbitrary code execution on the host MCU, which would undermine any function the fingerprint sensor is meant to protect. The fix validates the declared length against CONFIG_R502A_DATA_PKT_SIZE as soon as the header is complete and aborts the reception if it is out of range.
Analysis and contextual insights are available on OpenCVE Cloud.
No vendor fix or workaround currently provided.
Additional remediation guidance may be available on OpenCVE Cloud.
Tracking
Sign in to view the affected projects.
No advisories yet.
Wed, 25 Nov 2026 22:00:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Description | The Grow R502-A fingerprint sensor driver (drivers/sensor/grow_r502a/grow_r502a.c) receives sensor responses in the UART interrupt handler uart_cb_handler(). Once the 9-byte header has arrived, the handler reads the 16-bit package length from the header and uses it as the byte count for further uart_fifo_read() calls into rx_buf.data. It never checks that length against the destination buffer. That buffer is a union r502a_packet on the calling thread's stack, set up by transceive_packet(), and is only CONFIG_R502A_DATA_PKT_SIZE + 12 bytes long (140 bytes by default). A malicious or counterfeit sensor module, or an attacker who tampers with the UART wiring, can reply to any driver command with a header that declares a length of up to 65535 bytes. The ISR then writes that many attacker-supplied bytes past the end of the stack buffer. The existing length check in r502a_validate_rx_packet() runs only after the data has been written, so it does not prevent the overflow. Every sensor transaction is affected, including the ones issued by fps_init() during device initialization. The result is a stack overwrite with attacker-controlled length and content in the calling thread. This can corrupt control data and may lead to arbitrary code execution on the host MCU, which would undermine any function the fingerprint sensor is meant to protect. The fix validates the declared length against CONFIG_R502A_DATA_PKT_SIZE as soon as the header is complete and aborts the reception if it is out of range. | |
| Title | Stack buffer overflow in Grow R502-A fingerprint sensor driver UART RX handler | |
| Weaknesses | CWE-121 | |
| References |
| |
| Metrics |
cvssV3_1
|
Subscriptions
No data.
Status: PUBLISHED
Assigner: zephyr
Published:
Updated: 2026-11-25T20:27:19.913Z
Reserved: 2026-09-29T20:25:33.540Z
Link: CVE-2026-102960
No data.
Status : Awaiting Analysis
Published: 2026-11-25T21:17:16.087
Modified: 2026-11-25T21:17:16.193
Link: CVE-2026-102960
No data.
OpenCVE Enrichment
No data.
-
CWE-121
Stack-based Buffer Overflow