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]
Date: Mon, 26 Feb 2024 14:39:37 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Duoming Zhou <duoming@....edu.cn>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	gregory.clement@...tlin.com, sebastian.hesselbarth@...il.com,
	linux@...linux.org.uk
Subject: Re: [PATCH] ARM: mvebu: Add check in coherency.c to prevent null
 pointer dereference

On Sun, Feb 25, 2024 at 02:04:50PM +0800, Duoming Zhou wrote:
> The kzalloc() in armada_375_380_coherency_init() will return
> null if the physical memory has run out. As a result, if we
> dereference the property pointer, the null pointer dereference
> bug will happen.
> 
> This patch adds a check to avoid null pointer dereference.
> 
> Fixes: 497a92308af8 ("ARM: mvebu: implement L2/PCIe deadlock workaround")
> Signed-off-by: Duoming Zhou <duoming@....edu.cn>

I have to wounder how we can run out of memory here. This code is
being called from:

postcore_initcall(coherency_late_init);

If you look at:

https://elixir.bootlin.com/linux/latest/source/include/linux/init.h#L299

You can see that only true kernel core stuff has been called before
that. If that has consumed all the available memory, something is very
seriously wrong, and the machine is not going to last another couple
of milliseconds before it crashes no matter what checking you do.

So i do wounder if your time could be better spent in other places?

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ