linux-stable/fs/pstore
Kunwu Chan 98e2b97acb pstore/zone: Add a null pointer check to the psz_kmsg_read
[ Upstream commit 98bc7e26e1 ]

kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure. Ensure the allocation was successful
by checking the pointer validity.

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20240118100206.213928-1-chentao@kylinos.cn
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-13 12:59:41 +02:00
..
Kconfig pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES 2023-01-14 10:16:22 +01:00
Makefile pstore/blk: Introduce backend for block devices 2020-05-30 10:34:03 -07:00
blk.c pstore/blk: Introduce "best_effort" mode 2020-05-31 19:49:01 -07:00
ftrace.c pstore/ftrace: Provide ftrace log merging routine 2020-05-30 10:34:02 -07:00
inode.c pstore: Fix warning in pstore_kill_sb() 2021-03-25 09:04:08 +01:00
internal.h pstore/ftrace: Provide ftrace log merging routine 2020-05-30 10:34:02 -07:00
platform.c pstore/platform: Add check for kstrdup 2023-11-20 11:06:44 +01:00
pmsg.c pstore: Revert pmsg_lock back to a normal mutex 2023-05-17 11:47:54 +02:00
ram.c pstore/ram: Fix crash when setting number of cpus to an odd number 2024-02-23 08:42:04 +01:00
ram_core.c pstore: ram_core: fix possible overflow in persistent_ram_init_ecc() 2024-01-25 14:37:42 -08:00
zone.c pstore/zone: Add a null pointer check to the psz_kmsg_read 2024-04-13 12:59:41 +02:00