]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rtlwifi: Fix potential overflow on P2P code
authorLaura Abbott <labbott@redhat.com>
Fri, 18 Oct 2019 11:43:21 +0000 (07:43 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 15 Nov 2019 00:56:56 +0000 (00:56 +0000)
commitb78c8469ceff4288d1092e22bfb277d3bd0d7147
tree1433002a0bd79b93049e6d610bc056480f39061a
parente70efb76ea2eb9f08dc627d93d35a8e5c065346d
rtlwifi: Fix potential overflow on P2P code

commit 8c55dedb795be8ec0cf488f98c03a1c2176f7fb1 upstream.

Nicolas Waisman noticed that even though noa_len is checked for
a compatible length it's still possible to overrun the buffers
of p2pinfo since there's no check on the upper bound of noa_num.
Bound noa_num against P2P_MAX_NOA_NUM.

Reported-by: Nicolas Waisman <nico@semmle.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/rtlwifi/ps.c