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: <BL0PR11MB31226B042632413AB8C12D63BD90A@BL0PR11MB3122.namprd11.prod.outlook.com>
Date: Mon, 18 Dec 2023 05:54:30 +0000
From: "Pucha, HimasekharX Reddy" <himasekharx.reddy.pucha@...el.com>
To: Kunwu Chan <chentao@...inos.cn>, "Brandeburg, Jesse"
	<jesse.brandeburg@...el.com>, "Nguyen, Anthony L"
	<anthony.l.nguyen@...el.com>, "davem@...emloft.net" <davem@...emloft.net>,
	"edumazet@...gle.com" <edumazet@...gle.com>, "kuba@...nel.org"
	<kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"jeffrey.t.kirsher@...el.com" <jeffrey.t.kirsher@...el.com>,
	"shannon.nelson@....com" <shannon.nelson@....com>
CC: Kunwu Chan <kunwu.chan@...mail.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "Lobakin, Aleksander"
	<aleksander.lobakin@...el.com>, "intel-wired-lan@...ts.osuosl.org"
	<intel-wired-lan@...ts.osuosl.org>, Simon Horman <horms@...nel.org>
Subject: RE: [Intel-wired-lan] [PATCH v5 iwl-next] i40e: Use correct buffer
 size in i40e_dbg_command_read

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Kunwu Chan
> Sent: Friday, December 8, 2023 8:50 AM
> To: Brandeburg, Jesse <jesse.brandeburg@...el.com>; Nguyen, Anthony L <anthony.l.nguyen@...el.com>; davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org; pabeni@...hat.com; jeffrey.t.kirsher@...el.com; shannon.nelson@....com
> Cc: Kunwu Chan <chentao@...inos.cn>; Kunwu Chan <kunwu.chan@...mail.com>; netdev@...r.kernel.org; linux-kernel@...r.kernel.org; Lobakin, Aleksander <aleksander.lobakin@...el.com>; intel-wired-lan@...ts.osuosl.org; Simon Horman <horms@...nel.org>
> Subject: [Intel-wired-lan] [PATCH v5 iwl-next] i40e: Use correct buffer size in i40e_dbg_command_read
>
> The size of "i40e_dbg_command_buf" is 256, the size of "name"
> depends on "IFNAMSIZ", plus a null character and format size,
> the total size is more than 256.
>
> Improve readability and maintainability by replacing a hardcoded string
> allocation and formatting by the use of the kasprintf() helper.
>
> Fixes: 02e9c290814c ("i40e: debugfs interface")
> Suggested-by: Simon Horman <horms@...nel.org>
> Suggested-by: Alexander Lobakin <aleksander.lobakin@...el.com>
> Suggested-by: Tony Nguyen <anthony.l.nguyen@...el.com>
> Cc: Kunwu Chan <kunwu.chan@...mail.com>
> Signed-off-by: Kunwu Chan <chentao@...inos.cn>
> ---
> v2
>    - Update the size calculation with IFNAMSIZ and sizeof(i40e_dbg_command_buf)
> v3
>    - Use kasprintf to improve readability and maintainability
> v4
>    - Fix memory leak in error path
> v5
>    - Change the order of labels
> ---
>  .../net/ethernet/intel/i40e/i40e_debugfs.c    | 20 ++++++++++---------
>  1 file changed, 11 insertions(+), 9 deletions(-)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com> (A Contingent worker at Intel)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ