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: <SJ1PR11MB6083603821632C25DA5D8EEBFC7BA@SJ1PR11MB6083.namprd11.prod.outlook.com>
Date: Wed, 25 Jun 2025 18:22:57 +0000
From: "Luck, Tony" <tony.luck@...el.com>
To: Dan Carpenter <dan.carpenter@...aro.org>,
	Uwe Kleine-König <u.kleine-koenig@...libre.com>
CC: Zaid Alali <zaidal@...amperecomputing.com>, "Rafael J. Wysocki"
	<rafael@...nel.org>, Len Brown <lenb@...nel.org>, James Morse
	<james.morse@....com>, Borislav Petkov <bp@...en8.de>, "Weiny, Ira"
	<ira.weiny@...el.com>, Jonathan Cameron <Jonathan.Cameron@...wei.com>,
	"Williams, Dan J" <dan.j.williams@...el.com>, Al Viro
	<viro@...iv.linux.org.uk>, Sudeep Holla <sudeep.holla@....com>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: RE: [PATCH v2 next] ACPI: APEI: EINJ: prevent memory corruption in
 error_type_set()

> > +	if (count > sizeof(einj_buf))

Why not:
	/* Leave the last character for the NUL terminator */
	if (count > sizeof(einj_buf) - 1)
		return -EINVAL;

here. Then skip the min(...) addition below.

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ