Skip to content
Commit e8c8e0d0 authored by Ryosuke Yasuoka's avatar Ryosuke Yasuoka Committed by Greg Kroah-Hartman
Browse files

nfc: nci: Fix uninit-value in nci_rx_work



[ Upstream commit e4a87abf ]

syzbot reported the following uninit-value access issue [1]

nci_rx_work() parses received packet from ndev->rx_q. It should be
validated header size, payload size and total packet size before
processing the packet. If an invalid packet is detected, it should be
silently discarded.

Fixes: d24b0353 ("nfc: nci: Fix uninit-value in nci_dev_up and nci_ntf_packet")
Reported-and-tested-by: default avatar <syzbot+d7b4dc6cd50410152534@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=d7b4dc6cd50410152534

 [1]
Signed-off-by: default avatarRyosuke Yasuoka <ryasuoka@redhat.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 47c5707d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment