lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cca70257-b8bf-4d4f-9a0e-b5116536734e@intel.com>
Date: Wed, 28 Aug 2024 10:20:40 +0200
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: Thomas Bogendoerfer <tbogendoerfer@...e.de>
CC: "David S. Miller" <davem@...emloft.net>, Tony Nguyen
	<anthony.l.nguyen@...el.com>, Eric Dumazet <edumazet@...gle.com>, "Jakub
 Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Daniel Machon
	<daniel.machon@...rochip.com>, Dave Ertman <david.m.ertman@...el.com>,
	<intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 net] ice: Fix NULL pointer access, if PF doesn't
 support SRIOV_LAG

On 8/27/24 11:52, Przemek Kitszel wrote:
> On 8/27/24 09:16, Thomas Bogendoerfer wrote:
>> For PFs, which don't support SRIOV_LAG, there is no pf->lag struct
>> allocated. So before accessing pf->lag a NULL pointer check is needed.
>>
>> Fixes: 1e0f9881ef79 ("ice: Flesh out implementation of support for 
>> SRIOV on bonded interface")
>> Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@...e.de>
>> ---
>> v2:
>>   - Added Fixes tag
>> v1: 
>> https://lore.kernel.org/netdev/20240826085830.28136-1-tbogendoerfer@suse.de/
> 
> Please see my reply to v1, unfortunately sent at the same time as your
> v2. The fixes tag should be different. The check that you have
> introduced here repeats the check in the only caller (was not effective
> though).
> 
>>
>>   drivers/net/ethernet/intel/ice/ice_lag.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c 
>> b/drivers/net/ethernet/intel/ice/ice_lag.c
>> index 1ccb572ce285..916a16a379a8 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_lag.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_lag.c
>> @@ -704,7 +704,7 @@ void ice_lag_move_new_vf_nodes(struct ice_vf *vf)
>>       lag = pf->lag;
>>       mutex_lock(&pf->lag_mutex);
>> -    if (!lag->bonded)
>> +    if (!lag || !lag->bonded)
>>           goto new_vf_unlock;
>>       pri_port = pf->hw.port_info->lport;
> 
> 

thank you,
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ