nuttx/drivers/contactless
hanzhijian 20579ab531 drivers/contactless: fix uninitialized uid leak in mfrc522_read
Fix security issue where uninitialized kernel stack contents could be
leaked to userspace when mfrc522_picc_select() fails.

In mfrc522_read(), the local variable 'uid' was not initialized before
being passed to mfrc522_picc_select(). If the function fails (e.g., due
to bad data on the SPI bus), the uninitialized uid.sak value could pass
the PICC_TYPE_NOT_COMPLETE check, causing snprintf() to copy
uninitialized kernel stack data to the userspace buffer.

Fixes #19417

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
Author: hanzhijian <hanzhijian@zepp.com>
2026-07-13 19:50:57 +08:00
..
CMakeLists.txt drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
Kconfig drivers/*/Kconfig: Consolidate driver Kconfig Files. 2020-02-15 15:19:11 +01:00
Make.defs drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
mfrc522.c drivers/contactless: fix uninitialized uid leak in mfrc522_read 2026-07-13 19:50:57 +08:00
mfrc522.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
pn532.c drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-07-13 12:08:01 +02:00
pn532.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00