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: <aKNx_YW2jzWz2nLq@aschofie-mobl2.lan>
Date: Mon, 18 Aug 2025 11:33:33 -0700
From: Alison Schofield <alison.schofield@...el.com>
To: Akhilesh Patil <akhilesh@...iitb.ac.in>
CC: <saeedm@...dia.com>, <itayavr@...dia.com>, <dave.jiang@...el.com>,
	<jgg@...pe.ca>, <Jonathan.Cameron@...wei.com>, <Markus.Elfring@....de>,
	<linux-kernel@...r.kernel.org>, <akhileshpatilvnit@...il.com>,
	<skhan@...uxfoundation.org>
Subject: Re: [PATCH v2] fwctl: mlx5: fix memory alloc/free in mlx5ctl_fw_rpc()

On Sat, Aug 16, 2025 at 11:49:54AM +0530, Akhilesh Patil wrote:
> Use kvfree() to free memory allocated by kvzalloc() instead of kfree().
> Avoid potential memory management issue considering kvzalloc() can
> internally choose to use either kmalloc() or vmalloc() based on memory
> request and current system memory state. Hence, use more appropriate
> kvfree() which automatically determines correct free method to avoid
> potential hard to debug memory issues.
> Fix this issue discovered by running spatch static analysis tool using
> coccinelle script - scripts/coccinelle/api/kfree_mismatch.cocci
> 
> Fixes: 52929c2142041 ("fwctl/mlx5: Support for communicating with mlx5 fw")
> Signed-off-by: Akhilesh Patil <akhilesh@...iitb.ac.in>
> Reviewed-by: Dave Jiang <dave.jiang@...el.com>
> ---
> changes v1 -> v2:
> - Update commit message with details on why this issue needs to be fixed
>   as suggested by Alison <alison.schofield@...el.com>
> - Update commit message with details on how this issue was discovered
>   using coccinelle scripts as suggested by Markus <Markus.Elfring@....de>
> - Carry forward Reviewd-by tag from Dave Jiang <dave.jiang@...el.com>


Reviewed-by: Alison Schofield  <alison.schofield@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ