Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fbcon: check return value of con2fb_acquire_newinfo()

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>

authored by

Andrey Vatoropin and committed by
Helge Deller
011a0502 40227f2e

+2 -1
+2 -1
drivers/video/fbdev/core/fbcon.c
··· 1068 1068 return; 1069 1069 1070 1070 if (!info->fbcon_par) 1071 - con2fb_acquire_newinfo(vc, info, vc->vc_num); 1071 + if (con2fb_acquire_newinfo(vc, info, vc->vc_num)) 1072 + return; 1072 1073 1073 1074 /* If we are not the first console on this 1074 1075 fb, copy the font from that console */