[PATCH] linux_compat: fix NULL pointer dereference in get_mem()

Tom Rini trini at konsulko.com
Fri Mar 13 21:55:11 CET 2026


On Fri, 27 Feb 2026 00:27:28 +0300, Anton Moryakov wrote:

> Add NULL check after memalign() call in get_mem() to prevent
> potential NULL pointer dereference (CWE-476).
> 
> The function memalign() can return NULL on allocation failure.
> Dereferencing the returned pointer without checking for NULL
> may cause a crash in low-memory conditions.
> 
> [...]

Applied to u-boot/next, thanks!

[1/1] linux_compat: fix NULL pointer dereference in get_mem()
      commit: 21edd76aded65d566f20a6937495c0c3965b4063
-- 
Tom




More information about the U-Boot mailing list