Re: [PATCH] net: dsa: bcm_sf2: fix buffer overflow doing set_rxnfc

2019-04-30 Thread David Miller
From: Dan Carpenter Date: Tue, 30 Apr 2019 13:44:19 +0300 > The "fs->location" is a u32 that comes from the user in ethtool_set_rxnfc(). > We can't pass unclamped values to test_bit() or it results in an out of > bounds access beyond the end of the bitmap. > > Fixes: 7318166cacad ("net: dsa: bcm

[PATCH] net: dsa: bcm_sf2: fix buffer overflow doing set_rxnfc

2019-04-30 Thread Dan Carpenter
The "fs->location" is a u32 that comes from the user in ethtool_set_rxnfc(). We can't pass unclamped values to test_bit() or it results in an out of bounds access beyond the end of the bitmap. Fixes: 7318166cacad ("net: dsa: bcm_sf2: Add support for ethtool::rxnfc") Signed-off-by: Dan Carpenter -