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: <86ikr1plf6.wl-maz@kernel.org>
Date: Mon, 30 Dec 2024 09:30:53 +0000
From: Marc Zyngier <maz@...nel.org>
To: Charles Han <hanchunchao@...pur.com>
Cc: <marcan@...can.st>,
	<sven@...npeter.dev>,
	<alyssa@...enzweig.io>,
	<rafael@...nel.org>,
	<viresh.kumar@...aro.org>,
	<asahi@...ts.linux.dev>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-pm@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cpufreq: apple-soc: Fix possible null-ptr-deref for cpufreq_cpu_get_raw()

On Mon, 30 Dec 2024 03:57:14 +0000,
Charles Han <hanchunchao@...pur.com> wrote:
> 
> cpufreq_cpu_get_raw() may return NULL if the cpu is not in
> policy->cpus cpu mask and it will cause null pointer dereference.
> But this returned value in apple_soc_cpufreq_get_rate() is not
> checked. Add NULL check in apple_soc_cpufreq_get_rate(), to handle
> kernel NULL pointer dereference error.

The only way I can see a CPU not having an assigned policy is when the
DT is incomplete. And even then, reaching this code path doesn't look
obvious to me.

Can you describe how you get into this situation?

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ