[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <44c35bd8-b7c3-49be-3a67-e9b1c8a02617@gmail.com>
Date: Tue, 19 Jan 2021 09:14:03 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net] net: dsa: b53: fix an off by one in checking
"vlan->vid"
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 <dan.carpenter@...cle.com>
Acked-by: Florian Fainelli <f.fainelli@...il.com>
--
Florian
Powered by blists - more mailing lists