Helge Deller
fc8ef07141
fbcon: Fix null-ptr-deref in soft_cursor
commit d78bd6cc68 upstream.
syzbot repored this bug in the softcursor code:
BUG: KASAN: null-ptr-deref in soft_cursor+0x384/0x6b4 drivers/video/fbdev/core/softcursor.c:70
Read of size 16 at addr 0000000000000200 by task kworker/u4:1/12
CPU: 0 PID: 12 Comm: kworker/u4:1 Not tainted 6.4.0-rc3-syzkaller-geb0f1697d729 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Workqueue: events_power_efficient fb_flashcursor
Call trace:
dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233
show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106
print_report+0xe4/0x514 mm/kasan/report.c:465
kasan_report+0xd4/0x130 mm/kasan/report.c:572
kasan_check_range+0x264/0x2a4 mm/kasan/generic.c:187
__asan_memcpy+0x3c/0x84 mm/kasan/shadow.c:105
soft_cursor+0x384/0x6b4 drivers/video/fbdev/core/softcursor.c:70
bit_cursor+0x113c/0x1a64 drivers/video/fbdev/core/bitblit.c:377
fb_flashcursor+0x35c/0x54c drivers/video/fbdev/core/fbcon.c:380
process_one_work+0x788/0x12d4 kernel/workqueue.c:2405
worker_thread+0x8e0/0xfe8 kernel/workqueue.c:2552
kthread+0x288/0x310 kernel/kthread.c:379
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:853
This fix let bit_cursor() bail out early when a font bitmap
isn't available yet.
Signed-off-by: Helge Deller <deller@gmx.de>
Reported-by: syzbot+d910bd780e6efac35869@syzkaller.appspotmail.com
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:32:33 +02:00
..
2021-06-03 10:32:49 +02:00
2023-06-09 10:32:33 +02:00
2023-04-05 11:24:53 +02:00
2020-05-06 19:29:10 +02:00
2023-04-05 11:24:53 +02:00
2021-07-26 20:06:00 +02:00
2023-01-12 11:59:17 +01:00
2021-06-03 10:32:49 +02:00
2020-12-08 18:34:25 +01:00
2023-04-05 11:24:53 +02:00
2021-02-18 15:14:32 +01:00
2023-01-24 07:22:42 +01:00
2021-07-26 20:06:03 +02:00
2020-09-08 13:33:15 +02:00
2022-08-17 14:24:11 +02:00
2022-12-31 13:14:32 +01:00
2022-12-31 13:14:31 +01:00
2020-01-03 14:27:43 +01:00
2021-02-24 13:38:31 -08:00
2019-06-19 17:09:55 +02:00
2022-08-17 14:24:11 +02:00
2021-02-12 10:01:45 +00:00
2023-05-24 17:36:42 +01:00
2022-08-17 14:24:16 +02:00
2021-07-26 20:05:50 +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
2022-04-08 14:23:00 +02:00
2017-11-02 11:10:55 +01:00
2022-04-08 14:23:14 +02:00
2019-12-05 10:57:53 +02:00
2019-06-03 16:00:08 +02:00
2023-04-05 11:24:53 +02:00
2018-01-04 16:53:49 +01:00
2019-12-05 10:57:53 +02:00
2016-02-26 13:06:11 +02:00
2016-02-26 13:06:11 +02:00
2020-12-08 18:34:08 +01:00
2020-03-09 11:12:19 +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
2020-12-08 18:34:08 +01:00
2020-12-08 18:34:08 +01:00
2020-01-15 17:31:50 +01:00
2022-09-15 11:30:01 +02:00
2022-04-08 14:24:00 +02:00
2019-12-05 10:57:53 +02:00
2019-12-05 10:57:53 +02:00
2022-04-08 14:23:14 +02:00
2019-05-30 11:26:32 -07:00
2020-09-08 13:33:16 +02:00
2019-06-19 17:09:55 +02:00
2021-02-12 10:01:45 +00:00
2019-12-05 10:57:53 +02:00
2022-05-18 10:26:49 +02:00
2022-12-31 13:14:32 +01:00
2020-12-08 18:34:08 +01:00
2019-12-05 10:57:53 +02:00
2020-10-17 08:23:14 +02:00
2020-02-19 10:58:22 -08:00
2021-10-06 11:12:28 +02:00
2020-12-08 18:34:50 +01:00
2020-07-20 11:47:29 +02:00
2020-08-23 17:36:59 -05:00
2019-12-05 10:57:53 +02:00
2021-05-21 15:04:05 +02:00
2020-06-09 09:39:13 -07:00
2020-06-17 10:57:41 -07:00
2022-12-31 13:14:39 +01:00
2022-09-23 14:15:49 +02:00
2023-06-09 10:32:21 +02:00
2021-05-07 18:34:18 +02:00
2022-12-31 13:14:32 +01:00
2020-12-08 18:34:08 +01:00
2020-07-20 11:47:29 +02:00
2020-10-15 10:46:16 -07:00
2019-12-05 10:57:53 +02:00
2020-07-20 11:47:29 +02:00
2020-11-30 20:04:56 +01:00
2017-04-20 12:02:32 +01:00
2021-07-21 15:02:03 +02:00
2020-01-03 14:27:49 +01:00
2020-08-23 17:36:59 -05:00
2020-12-08 18:34:08 +01:00
2019-12-05 10:57:53 +02:00
2022-12-31 13:14:31 +01:00
2020-07-16 12:35:15 -07: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-12-04 01:01:22 +11:00
2020-08-05 19:47:22 +02:00
2022-09-23 14:15:51 +02:00
2017-11-02 11:10:55 +01:00
2020-08-23 17:36:59 -05:00
2017-11-02 11:10:55 +01:00
2020-08-23 17:36:59 -05:00
2019-08-26 10:02:02 +02:00
2020-06-09 09:39:13 -07:00
2020-11-29 22:51:07 +01:00
2020-08-20 17:48:12 +02:00
2020-08-20 17:48:12 +02:00
2016-08-11 17:54:55 +03:00
2020-12-05 21:01:04 +01:00
2022-08-17 14:24:16 +02:00
2020-08-23 17:36:59 -05:00
2020-04-17 15:50:11 +02:00
2020-09-25 16:34:50 +02:00
2017-11-02 11:10:55 +01:00
2020-01-30 08:04:01 -08:00
2020-11-01 10:29:04 +01:00
2019-06-12 20:28:11 +02:00
2022-05-18 10:26:48 +02:00
2019-12-05 10:57:53 +02:00
2020-08-23 17:36:59 -05:00
2019-04-01 17:46:59 +02:00
2022-04-08 14:24:02 +02:00
2023-02-09 11:26:47 +01:00
2021-07-27 17:18:26 +02:00
2020-11-30 20:04:59 +01:00
2022-06-09 10:22:26 +02:00
2023-06-09 10:32:21 +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-12-08 18:34:08 +01:00
2020-11-30 20:04:30 +01:00
2023-04-05 11:24:53 +02:00
2019-12-05 10:57:53 +02:00
2020-01-30 08:04:01 -08:00
2023-05-30 13:55:31 +01:00
2022-12-31 13:14:32 +01:00
2020-05-06 21:04:45 +02:00
2019-05-30 11:26:32 -07:00
2022-06-09 10:23:16 +02:00
2019-12-05 10:57:53 +02:00
2022-01-20 09:13:14 +01:00
2020-04-17 15:50:08 +02:00
2019-06-05 17:36:37 +02:00
2022-08-17 14:24:16 +02:00
2022-04-08 14:23:59 +02: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
2020-12-08 18:34:36 +01:00
2017-11-02 11:10:55 +01:00
2020-08-23 17:36:59 -05:00
2021-07-13 13:58:29 -05:00