Helge Deller
0f747181d8
fbcon: Fix null-ptr-deref in soft_cursor
...
commit d78bd6cc68276bd57f766f7cb98bfe32c23ab327 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:24:04 +02:00
..
2020-10-29 09:55:09 +01:00
2023-06-09 10:24:04 +02:00
2023-04-05 11:15:40 +02:00
2017-11-02 11:10:55 +01:00
2023-04-05 11:15:39 +02:00
2021-09-22 11:48:04 +02:00
2018-03-28 16:34:28 +02:00
2018-06-12 16:19:22 -07:00
2017-11-02 11:10:55 +01:00
2018-06-17 05:00:24 +09:00
2023-04-05 11:15:39 +02:00
2018-07-24 19:11:28 +02:00
2022-04-15 14:14:55 +02:00
2021-09-22 11:48:04 +02:00
2018-04-24 18:11:21 +02:00
2022-08-25 11:15:24 +02:00
2023-01-18 11:30:29 +01:00
2023-01-18 11:30:29 +01:00
2017-09-04 16:00:49 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2022-08-25 11:15:24 +02:00
2018-07-31 13:06:58 +02:00
2022-08-25 11:15:27 +02:00
2021-09-22 11:48:04 +02:00
2017-11-02 11:10:55 +01:00
2022-04-15 14:14:41 +02:00
2017-11-02 11:10:55 +01:00
2020-12-30 11:25:54 +01:00
2018-06-17 05:00:24 +09:00
2023-04-05 11:15:40 +02:00
2018-01-04 16:53:49 +01:00
2018-06-12 16:19:22 -07:00
2017-08-07 17:22:13 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-07 17:22:13 +02:00
2017-08-07 17:22:13 +02:00
2017-08-07 17:22:13 +02:00
2022-09-15 12:17:05 +02:00
2022-04-15 14:14:55 +02:00
2019-02-12 19:47:15 +01:00
2017-08-01 17:20:39 +02:00
2017-11-09 18:09:33 +01:00
2017-09-04 16:00:49 +02:00
2017-08-01 17:20:39 +02:00
2017-11-09 18:09:31 +01:00
2020-08-26 10:31:05 +02:00
2017-09-04 16:00:50 +02:00
2017-08-07 17:22:13 +02:00
2017-09-04 16:00:49 +02:00
2018-07-24 19:11:26 +02:00
2018-07-24 19:11:27 +02:00
2017-09-04 16:00:49 +02:00
2021-05-26 11:48:35 +02:00
2021-01-12 20:10:20 +01:00
2022-08-25 11:15:47 +02:00
2021-05-26 11:48:34 +02:00
2018-06-12 16:19:22 -07:00
2023-01-18 11:30:29 +01:00
2017-08-07 17:22:13 +02:00
2018-01-16 16:47:29 +01:00
2018-05-14 15:47:30 +02:00
2017-09-04 16:00:50 +02:00
2018-07-24 19:11:26 +02:00
2018-06-12 16:19:22 -07:00
2020-08-19 08:14:51 +02:00
2018-03-12 17:06:54 +01:00
2017-08-07 17:22:13 +02:00
2023-01-18 11:30:29 +01:00
2017-08-01 17:20:45 +02:00
2017-09-04 16:00:50 +02:00
2017-09-04 16:00:50 +02:00
2017-09-04 16:00:50 +02:00
2017-09-04 16:00:49 +02:00
2020-11-05 11:08:39 +01:00
2022-09-28 11:02:53 +02:00
2017-11-02 11:10:55 +01:00
2020-02-24 08:34:36 +01:00
2017-11-02 11:10:55 +01:00
2020-08-19 08:14:54 +02:00
2018-07-24 19:11:26 +02:00
2017-09-04 16:00:50 +02:00
2018-03-26 15:56:46 +02:00
2018-03-28 16:34:29 +02:00
2022-08-25 11:15:27 +02:00
2017-10-17 16:01:13 +02:00
2017-10-17 16:01:13 +02:00
2019-11-24 08:20:36 +01:00
2017-11-02 11:10:55 +01:00
2018-05-14 15:47:30 +02:00
2018-05-14 15:47:30 +02:00
2018-07-03 17:43:09 +02:00
2018-06-15 18:10:01 -03:00
2018-04-26 12:24:18 +02:00
2019-05-25 18:23:36 +02:00
2022-04-15 14:14:56 +02:00
2022-11-03 23:52:28 +09:00
2019-10-07 18:56:30 +02:00
2017-11-02 11:10:55 +01:00
2023-06-09 10:23:58 +02:00
2017-08-01 17:20:43 +02:00
2017-08-07 17:22:13 +02:00
2017-08-01 17:20:41 +02:00
2017-08-07 17:22:13 +02:00
2018-07-24 19:11:28 +02:00
2023-04-05 11:15:39 +02:00
2018-07-24 19:11:28 +02:00
2022-04-15 14:14:55 +02:00
2023-01-18 11:30:29 +01:00
2018-01-04 16:53:50 +01:00
2020-10-29 09:55:09 +01:00
2017-12-29 19:48:44 +01:00
2022-08-25 11:15:26 +02:00
2022-04-15 14:14:55 +02:00
2017-12-29 19:48:43 +01:00
2017-11-02 11:10:55 +01:00
2018-06-12 16:19:22 -07:00
2017-08-21 16:49:57 +02:00