[SRU Bionic 1/1] UBUNTU: SAUCE: fbdev: remove redundant lock_fb_info

Cengiz Can cengiz.can at canonical.com
Fri Sep 23 22:31:25 UTC 2022


BugLink: https://bugs.launchpad.net/bugs/1990690

One of the fixing commits for CVE-2021-33655, commit 159a96b199b4
("fbcon: Prevent that screen size is smaller than font size")
introduced a redundant lock_fb_info line into the ioctl flow in fbmem.c.

This causes a deadlock when calling FBIOPUT_VSCREENINFO ioctl.

Remove problematic lock_fb_info call.

Signed-off-by: Cengiz Can <cengiz.can at canonical.com>
---
 drivers/video/fbdev/core/fbmem.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 1238cc9f42c03..78adcfa11d010 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1150,7 +1150,6 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
 			ret = fb_set_var(info, &var);
 			info->flags &= ~FBINFO_MISC_USEREVENT;
 		}
-		lock_fb_info(info);
 		unlock_fb_info(info);
 		console_unlock();
 		if (!ret && copy_to_user(argp, &var, sizeof(var)))
-- 
2.34.1




More information about the kernel-team mailing list