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: <9b9f3b87-60a3-4ba6-aced-6a24ddfd0741@intel.com>
Date: Wed, 12 Feb 2025 17:21:13 +0100
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Wentao Liang <vulab@...as.ac.cn>
CC: <Steen.Hegelund@...rochip.com>, <daniel.machon@...rochip.com>,
	<UNGLinuxDriver@...rochip.com>, <andrew+netdev@...n.ch>,
	<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<pabeni@...hat.com>, <linux-arm-kernel@...ts.infradead.org>,
	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<stable@...r.kernel.org>
Subject: Re: [PATCH v2] net: microchip: sparx5: Fix potential NULL pointer
 dereference

From: Wentao Liang <vulab@...as.ac.cn>
Date: Wed, 12 Feb 2025 22:18:28 +0800

> Check the return value of vcap_keyfields() in
> vcap_debugfs_show_rule_keyset(). If vcap_keyfields()
> returns NULL, skip the keyfield to prevent a NULL pointer
> dereference when calling vcap_debugfs_show_rule_keyfield().

Do you have a repro for this? Is this possible to trigger a real nullptr
deref here or it's just "let it be"?

> 
> Fixes: 610c32b2ce66 ("net: microchip: vcap: Add vcap_get_rule")
> Cc: stable@...r.kernel.org # 6.2+
> Signed-off-by: Wentao Liang <vulab@...as.ac.cn>
> ---
>  drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c b/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c
> index 59bfbda29bb3..e9e2f7af9be3 100644
> --- a/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c
> +++ b/drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c
> @@ -202,6 +202,8 @@ static int vcap_debugfs_show_rule_keyset(struct vcap_rule_internal *ri,
>  
>  	list_for_each_entry(ckf, &ri->data.keyfields, ctrl.list) {
>  		keyfield = vcap_keyfields(vctrl, admin->vtype, ri->data.keyset);
> +		if (!keyfield)
> +			continue;
>  		vcap_debugfs_show_rule_keyfield(vctrl, out, ckf->ctrl.key,
>  						keyfield, &ckf->data);
>  	}

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ