diff options
author | Hangyu Hua <[email protected]> | 2023-09-08 14:19:48 +0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2023-09-11 08:26:10 +0100 |
commit | 9b90aca97f6d5255ca41e716720d138b878cd034 (patch) | |
tree | bbfcf158c663656854fe7c08ebb3616e29bccb88 /net/switchdev/switchdev.c | |
parent | fa60b8163816f194786f3ee334c9a458da7699c6 (diff) |
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: c5d511c49587 ("net: bcmasp: Add support for wake on net filters")
Signed-off-by: Hangyu Hua <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions