Skip to content
Commit 9b90aca9 authored by Hangyu Hua's avatar Hangyu Hua Committed by David S. Miller
Browse files

net: ethernet: bcmasp: fix possible OOB write in bcmasp_netfilt_get_all_active()



rule_locs is allocated in ethtool_get_rxnfc and the size is determined by
rule_cnt from user space. So rule_cnt needs to be check before using
rule_locs to avoid OOB writing or NULL pointer dereference.

Fixes: c5d511c4 ("net: bcmasp: Add support for wake on net filters")
Signed-off-by: default avatarHangyu Hua <hbh25y@gmail.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fa60b816
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