diff options
| author | Andrey Vatoropin <a.vatoropin@crpt.ru> | 2025-12-17 12:11:05 +0300 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2026-03-04 15:21:57 +0300 |
| commit | 0b038c0be6827dd2dbb1ce4f8d92d97c80cbe9cc (patch) | |
| tree | a92eb5953c5ec90a347c874e8b61c26eda2d1462 | |
| parent | e93d898ee9970abf829a24c51f84d8f85cec761d (diff) | |
| download | linux-0b038c0be6827dd2dbb1ce4f8d92d97c80cbe9cc.tar.xz | |
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>
| -rw-r--r-- | drivers/video/fbdev/core/fbcon.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index e681066736de..abe9e0ad9b43 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -1043,7 +1043,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 */ |
