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: <bf497897-9674-45f1-b052-fb4ee0a0a4d5@opensource.cirrus.com>
Date: Thu, 31 Jul 2025 17:21:20 +0100
From: Richard Fitzgerald <rf@...nsource.cirrus.com>
To: Mark Brown <broonie@...nel.org>,
        Simon Trimmer <simont@...nsource.cirrus.com>
Cc: linux-spi@...r.kernel.org, linux-sound@...r.kernel.org,
        linux-kernel@...r.kernel.org, patches@...nsource.cirrus.com
Subject: Re: [PATCH] spi: cs42l43: Property entry should be a null-terminated
 array

On 31/07/2025 5:20 pm, Mark Brown wrote:
> On Thu, Jul 31, 2025 at 04:01:09PM +0000, Simon Trimmer wrote:
>> The software node does not specify a count of property entries, so the
>> array must be null-terminated.
>>
>> When unterminated, this can lead to a fault in the downstream cs35l56
>> amplifier driver, because the node parse walks off the end of the
>> array into unknown memory.
> 
>>   	if (spkid >= 0) {
>> -		props = devm_kmalloc(priv->dev, sizeof(*props), GFP_KERNEL);
>> +		props = devm_kcalloc(priv->dev, 2, sizeof(*props), GFP_KERNEL);
> 
> Does kcalloc() zero initialise the data?

"kcalloc — allocate memory for an array. The memory is set to zero. "

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ