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: <SA1PR11MB7130D0C4D54EBAD854CB18B68911A@SA1PR11MB7130.namprd11.prod.outlook.com>
Date: Fri, 19 Sep 2025 12:56:37 +0000
From: "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
To: Rui Qi <qirui.001@...edance.com>, "Luck, Tony" <tony.luck@...el.com>,
	"bp@...en8.de" <bp@...en8.de>, "mchehab@...nel.org" <mchehab@...nel.org>,
	"james.morse@....com" <james.morse@....com>, "rric@...nel.org"
	<rric@...nel.org>
CC: "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] EDAC/skx_common: Fix allocation check when
 adxl_component_count is 0

Hi Rui Qi,

Thanks for looking at the code.

> From: Rui Qi <qirui.001@...edance.com>
> [...]
> Subject: [PATCH] EDAC/skx_common: Fix allocation check when
> adxl_component_count is 0
> 
> From: Rui Qi <qirui.001@...edance.com>
> 
> Use ZERO_OR_NULL_PTR instead of simple NULL check to properly handle the
> case where adxl_component_count is 0, which would result in kcalloc
> returning ZERO_SIZE_PTR rather than NULL.
> 
> This ensures correct error handling when no ADXL components are present
> and prevents potential issues with zero-sized allocations.

If the ADXL component names are empty, skx_adxl_get() will immediately jump to error handling.
So, the adxl_component_count value is guaranteed to be non-zero when passed to kcalloc(). 

> 
> Signed-off-by: Rui Qi <qirui.001@...edance.com>
> [...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ