Qiujun Huang
b139f8b00d
fbcon: fix null-ptr-deref in fbcon_switch
Set logo_shown to FBCON_LOGO_CANSHOW when the vc was deallocated.
syzkaller report: https://lkml.org/lkml/2020/3/27/403
general protection fault, probably for non-canonical address
0xdffffc000000006c: 0000 [#1] SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000360-0x0000000000000367]
RIP: 0010:fbcon_switch+0x28f/0x1740
drivers/video/fbdev/core/fbcon.c:2260
Call Trace:
redraw_screen+0x2a8/0x770 drivers/tty/vt/vt.c:1008
vc_do_resize+0xfe7/0x1360 drivers/tty/vt/vt.c:1295
fbcon_init+0x1221/0x1ab0 drivers/video/fbdev/core/fbcon.c:1219
visual_init+0x305/0x5c0 drivers/tty/vt/vt.c:1062
do_bind_con_driver+0x536/0x890 drivers/tty/vt/vt.c:3542
do_take_over_console+0x453/0x5b0 drivers/tty/vt/vt.c:4122
do_fbcon_takeover+0x10b/0x210 drivers/video/fbdev/core/fbcon.c:588
fbcon_fb_registered+0x26b/0x340 drivers/video/fbdev/core/fbcon.c:3259
do_register_framebuffer drivers/video/fbdev/core/fbmem.c:1664 [inline]
register_framebuffer+0x56e/0x980 drivers/video/fbdev/core/fbmem.c:1832
dlfb_usb_probe.cold+0x1743/0x1ba3 drivers/video/fbdev/udlfb.c:1735
usb_probe_interface+0x310/0x800 drivers/usb/core/driver.c:374
accessing vc_cons[logo_shown].d->vc_top causes the bug.
Reported-by: syzbot+732528bae351682f1f27@syzkaller.appspotmail.com
Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200329085647.25133-1-hqjagain@gmail.com
2020-03-31 09:59:38 +02:00
..
2020-03-02 16:32:15 +01:00
2020-03-31 09:59:38 +02:00
2019-12-05 10:57:53 +02:00
2020-01-06 09:45:59 +01:00
2020-01-30 08:04:01 -08:00
2020-03-02 16:32:11 +01:00
2020-03-02 16:32:13 +01:00
2019-12-05 10:57:22 +02:00
2020-01-30 08:04:01 -08:00
2020-03-02 16:32:17 +01:00
2020-01-15 17:31:53 +01:00
2019-12-03 11:11:44 +02:00
2020-01-15 17:31:44 +01:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2020-01-06 09:45:59 +01:00
2020-02-04 03:05:26 +00:00
2020-01-03 14:27:43 +01:00
2019-12-05 10:57:53 +02:00
2019-06-19 17:09:55 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-04-01 17:46:55 +02:00
2019-04-01 17:46:55 +02:00
2019-04-01 17:46:55 +02:00
2019-04-01 17:46:55 +02:00
2017-11-02 11:10:55 +01:00
2019-08-19 13:24:10 +02:00
2017-11-02 11:10:55 +01:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-06-03 16:00:08 +02:00
2019-12-05 10:57:53 +02:00
2018-01-04 16:53:49 +01:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-11-04 10:48:14 +01:00
2017-11-02 11:10:55 +01:00
2020-01-30 08:04:01 -08:00
2017-11-02 11:10:55 +01:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2020-01-15 17:31:50 +01:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-05-30 11:26:32 -07:00
2019-12-05 10:57:53 +02:00
2019-06-19 17:09:55 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-17 13:57:54 +01:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2020-01-03 14:27:48 +01:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2020-02-17 10:34:34 +01:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2020-02-04 03:05:27 +00:00
2020-03-02 16:32:05 +01:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-09-22 09:30:30 -07:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2017-04-20 12:02:32 +01:00
2019-12-05 10:57:53 +02:00
2020-01-03 14:27:49 +01:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2020-01-30 08:04:01 -08:00
2020-01-30 08:04:01 -08:00
2020-01-30 08:04:01 -08:00
2020-01-30 08:04:01 -08:00
2020-01-30 08:04:01 -08:00
2019-12-05 10:57:53 +02:00
2020-01-30 08:04:01 -08:00
2019-05-24 17:36:45 +02:00
2017-11-02 11:10:55 +01:00
2020-03-02 16:31:47 +01:00
2017-11-02 11:10:55 +01:00
2020-01-03 14:27:50 +01:00
2019-08-26 10:02:02 +02:00
2019-12-05 10:57:53 +02:00
2020-02-17 10:34:34 +01:00
2019-12-05 10:57:53 +02:00
2020-01-03 14:27:45 +01:00
2019-12-05 10:57:53 +02:00
2020-01-15 17:31:48 +01:00
2019-08-26 10:02:02 +02:00
2018-10-08 12:57:36 +02:00
2017-11-02 11:10:55 +01:00
2020-01-30 08:04:01 -08:00
2020-03-02 16:31:48 +01:00
2019-06-12 20:28:11 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-08-02 13:22:37 +02:00
2019-04-01 17:46:59 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2020-03-02 16:32:17 +01:00
2020-01-30 08:04:01 -08:00
2017-11-02 11:10:55 +01:00
2020-01-30 08:04:01 -08:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2020-01-30 08:04:01 -08:00
2020-01-30 08:04:01 -08:00
2019-12-05 10:57:53 +02:00
2020-01-30 08:04:01 -08:00
2019-12-03 11:11:16 +02:00
2019-12-05 10:57:31 +02:00
2020-01-30 08:04:01 -08:00
2019-05-30 11:26:32 -07:00
2019-12-03 11:11:24 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2019-06-05 17:36:37 +02:00
2019-12-05 10:57:53 +02:00
2020-03-02 16:31:51 +01:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2020-03-02 16:32:04 +01:00
2019-06-05 17:36:37 +02:00
2017-11-02 11:10:55 +01:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00