[lvc-project] [PATCH] be2net: Remove potential access to the zero address
Fedor Pchelkin
pchelkin at ispras.ru
Fri Apr 18 10:50:43 MSK 2025
On Thu, 17. Apr 19:54, Jakub Kicinski wrote:
> On Wed, 16 Apr 2025 13:32:29 +0200 Michal Swiatkowski wrote:
> > > At the moment of calling the function be_cmd_get_mac_from_list() with the
> > > following parameters:
> > > be_cmd_get_mac_from_list(adapter, mac, &pmac_valid, NULL,
> > > adapter->if_handle, 0);
> >
> > Looks like pmac_valid needs to be false to reach *pmac_id assign.
>
> Right, it is for this caller and there is a check which skip this logic
> if pmac_id_valid is false, line 3738.
Wait, the check you are referring to is
if (*pmac_id_valid) {
memcpy(mac, resp->macid_macaddr.mac_addr_id.macaddr,
ETH_ALEN);
goto out;
}
which will skip that part only if pmac_id_valid is *true*.
More information about the lvc-project
mailing list