summaryrefslogtreecommitdiff
path: root/scripts/objdiff
diff options
context:
space:
mode:
authorYun Zhou <yun.zhou@windriver.com>2026-05-27 13:26:25 +0800
committerDavid Heidelberg <david@ixit.cz>2026-08-17 19:27:50 +0200
commit6dd0e471e0bb604b045a5e0f41b3d5d1f8652577 (patch)
treeada5c42f554288386bd6658a9da96b909364f1f4 /scripts/objdiff
parent5644560f08dd018b10abecbd971a7dd4ab540d81 (diff)
downloadlinux-next-6dd0e471e0bb604b045a5e0f41b3d5d1f8652577.tar.gz
linux-next-6dd0e471e0bb604b045a5e0f41b3d5d1f8652577.zip
nfc: nci: fix use of uninitialized memory in CORE_INIT_RSP parsing
nci_core_init_rsp_packet_v1() and nci_core_init_rsp_packet_v2() parse the CORE_INIT_RSP packet without validating that the skb contains enough data. A malformed response (e.g. injected via virtual_ncidev) can declare a large num_supported_rf_interfaces while providing insufficient data, causing reads of uninitialized slab memory. This is later used in nci_init_complete_req(), triggering a KMSAN uninit-value warning. Add skb length checks before accessing packet fields: - Validate the skb has at least 1 byte for the status field. - Validate the skb can hold the fixed-size header before parsing. - In v2, bounds-check each variable-length rf_interface entry and its extension parameters within the parsing loop. - In v1, verify the skb is large enough for both the variable-length rf_interfaces array and the trailing rsp_2 structure. Reported-by: syzbot+46ca2592193f2fb3debc@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=46ca2592193f2fb3debc Fixes: bcd684aace34 ("net/nfc/nci: Support NCI 2.x initial sequence") Signed-off-by: Yun Zhou <yun.zhou@windriver.com> Link: https://patch.msgid.link/20260527052625.3309581-1-yun.zhou@windriver.com Signed-off-by: David Heidelberg <david@ixit.cz>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions