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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aDQ5ipcH346PJPGp@mev-dev.igk.intel.com>
Date: Mon, 26 May 2025 11:51:06 +0200
From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
To: Haoxiang Li <haoxiang_li2024@....com>
Cc: anthony.l.nguyen@...el.com, przemyslaw.kitszel@...el.com,
	andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, sergey.temerkhanov@...el.com,
	intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] ice: Fix a null pointer dereference in
 ice_copy_and_init_pkg()

On Sat, May 24, 2025 at 03:26:58PM +0800, Haoxiang Li wrote:
> Add check for the return value of devm_kmemdup()
> to prevent potential null pointer dereference.
> 
> Fixes: 2ffd87d38d6b ("ice: Move support DDP code out of ice_flex_pipe.c")

This commit is only moving the code to new file. I think it should be:
c76488109616 ("ice: Implement Dynamic Device Personalization (DDP) download")

> Cc: stable@...r.kernel.org
> Signed-off-by: Haoxiang Li <haoxiang_li2024@....com>
> ---
>  drivers/net/ethernet/intel/ice/ice_ddp.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_ddp.c b/drivers/net/ethernet/intel/ice/ice_ddp.c
> index 59323c019544..351824dc3c62 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ddp.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ddp.c
> @@ -2301,6 +2301,8 @@ enum ice_ddp_state ice_copy_and_init_pkg(struct ice_hw *hw, const u8 *buf,
>  		return ICE_DDP_PKG_ERR;
>  
>  	buf_copy = devm_kmemdup(ice_hw_to_dev(hw), buf, len, GFP_KERNEL);
> +	if (!buf_copy)
> +		return ICE_DDP_PKG_ERR;

Fix looks fine, thanks
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>

>  
>  	state = ice_init_pkg(hw, buf_copy, len);
>  	if (!ice_is_init_pkg_successful(state)) {
> -- 
> 2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ