summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorAndrey Vatoropin <a.vatoropin@crpt.ru>2025-12-17 09:11:05 +0000
committerSasha Levin <sashal@kernel.org>2026-03-04 07:21:31 -0500
commit11a93180a70bb3095a9bd80d113d9277e30d9959 (patch)
tree831a1d777959ca64a2044bfc4fd2fe7c19c673b7 /drivers/video
parent0a08a7fa123c0c53d391833ad1c0757ee89d4ad2 (diff)
downloadlinux-11a93180a70bb3095a9bd80d113d9277e30d9959.tar.gz
linux-11a93180a70bb3095a9bd80d113d9277e30d9959.tar.bz2
linux-11a93180a70bb3095a9bd80d113d9277e30d9959.zip
fbcon: check return value of con2fb_acquire_newinfo()
[ Upstream commit 011a0502801c8536f64141a2b61362c14f456544 ] If fbcon_open() fails when called from con2fb_acquire_newinfo() then info->fbcon_par pointer remains NULL which is later dereferenced. Add check for return value of the function con2fb_acquire_newinfo() to avoid it. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: d1baa4ffa677 ("fbcon: set_con2fb_map fixes") Cc: stable@vger.kernel.org Signed-off-by: Andrey Vatoropin <a.vatoropin@crpt.ru> Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/core/fbcon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index e7e07eb2142e..7453377f3433 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -1047,7 +1047,8 @@ static void fbcon_init(struct vc_data *vc, bool init)
return;
if (!info->fbcon_par)
- con2fb_acquire_newinfo(vc, info, vc->vc_num);
+ if (con2fb_acquire_newinfo(vc, info, vc->vc_num))
+ return;
/* If we are not the first console on this
fb, copy the font from that console */