Re: [PATCH net] net: dsa: b53: fix an off by one in checking "vlan->vid"
From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2021-01-19 18:28:51
Also in:
kernel-janitors
From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2021-01-19 18:28:51
Also in:
kernel-janitors
On 1/19/2021 6:48 AM, Dan Carpenter wrote:
The > comparison should be >= to prevent accessing one element beyond
the end of the dev->vlans[] array in the caller function, b53_vlan_add().
The "dev->vlans" array is allocated in the b53_switch_init() function
and it has "dev->num_vlans" elements.
Fixes: a2482d2ce349 ("net: dsa: b53: Plug in VLAN support")
Signed-off-by: Dan Carpenter <redacted>Acked-by: Florian Fainelli <f.fainelli@gmail.com> -- Florian