syzbot


KASAN: global-out-of-bounds Read in soft_cursor (2)

Status: moderation: reported on 2025/02/26 01:19
Subsystems: fbdev
[Documentation on labels]
Reported-by: syzbot+6969304efc38b31c06c2@syzkaller.appspotmail.com
First crash: 5d21h, last: 5d21h
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: global-out-of-bounds Read in soft_cursor C done 22 1374d 1842d 1/1 fixed on 2021/06/24 08:01
upstream KASAN: global-out-of-bounds Read in soft_cursor fbdev 11 1678d 1904d 0/28 auto-closed as invalid on 2020/11/22 03:01
linux-4.14 KASAN: global-out-of-bounds Read in soft_cursor C error 19 901d 1900d 0/1 upstream: reported C repro on 2019/12/16 00:09
linux-5.15 KASAN: null-ptr-deref Read in soft_cursor origin:lts-only syz error 1 641d 641d 0/3 auto-obsoleted due to no activity on 2024/12/24 15:39
linux-4.14 KASAN: use-after-free Read in soft_cursor C inconclusive 7 1401d 1912d 0/1 upstream: reported C repro on 2019/12/04 13:11
linux-4.19 KASAN: slab-out-of-bounds Read in soft_cursor (2) C done 8 1377d 1499d 1/1 fixed on 2021/06/23 17:43
upstream general protection fault in soft_cursor fbdev C 3 642d 642d 22/28 fixed on 2023/07/01 16:05
linux-4.14 KASAN: slab-out-of-bounds Read in soft_cursor C unreliable 57 1382d 1913d 0/1 upstream: reported C repro on 2019/12/03 14:54

Sample crash report:
==================================================================
BUG: KASAN: global-out-of-bounds in soft_cursor+0x457/0xa10 drivers/video/fbdev/core/softcursor.c:70
Read of size 16 at addr ffffffff8bd63860 by task syz.3.5515/25461

CPU: 0 UID: 0 PID: 25461 Comm: syz.3.5515 Not tainted 6.14.0-rc3-syzkaller-00180-ga3daad821514 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:408 [inline]
 print_report+0xc3/0x670 mm/kasan/report.c:521
 kasan_report+0xd9/0x110 mm/kasan/report.c:634
 check_region_inline mm/kasan/generic.c:183 [inline]
 kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189
 __asan_memcpy+0x23/0x60 mm/kasan/shadow.c:105
 soft_cursor+0x457/0xa10 drivers/video/fbdev/core/softcursor.c:70
 bit_cursor+0xe90/0x1800 drivers/video/fbdev/core/bitblit.c:371
 fbcon_cursor+0x409/0x5f0 drivers/video/fbdev/core/fbcon.c:1343
 hide_cursor+0x84/0x220 drivers/tty/vt/vt.c:846
 do_con_write+0x21e6/0x7bb0 drivers/tty/vt/vt.c:3068
 con_write+0x23/0xb0 drivers/tty/vt/vt.c:3432
 do_output_char+0x5d6/0x840 drivers/tty/n_tty.c:428
 __process_echoes+0x228/0xb40 drivers/tty/n_tty.c:717
 flush_echoes drivers/tty/n_tty.c:807 [inline]
 __receive_buf drivers/tty/n_tty.c:1642 [inline]
 n_tty_receive_buf_common+0xa2a/0x1980 drivers/tty/n_tty.c:1739
 tty_ldisc_receive_buf+0xa2/0x190 drivers/tty/tty_buffer.c:387
 paste_selection+0x1e5/0x4e0 drivers/tty/vt/selection.c:432
 tioclinux+0x4fa/0x5d0 drivers/tty/vt/vt.c:3352
 vt_ioctl+0x2eb5/0x2f80 drivers/tty/vt/vt_ioctl.c:761
 vt_compat_ioctl+0x1c3/0x4e0 drivers/tty/vt/vt_ioctl.c:1115
 tty_compat_ioctl+0x2ee/0x4d0 drivers/tty/tty_io.c:2981
 __do_compat_sys_ioctl+0x1cb/0x2c0 fs/ioctl.c:1004
 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
 __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386
 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
 entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf73de579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f506655c EFLAGS: 00000296 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 000000000000000a RCX: 000000000000541c
RDX: 0000000080004940 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

The buggy address belongs to the variable:
 type_check_kinds+0x320/0xad0

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xbd63
flags: 0xfff00000002000(reserved|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000002000 ffffea00002f58c8 ffffea00002f58c8 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner info is not present (never set?)

Memory state around the buggy address:
 ffffffff8bd63700: 00 01 f9 f9 f9 f9 f9 f9 00 05 f9 f9 f9 f9 f9 f9
 ffffffff8bd63780: 03 f9 f9 f9 f9 f9 f9 f9 03 f9 f9 f9 f9 f9 f9 f9
>ffffffff8bd63800: 03 f9 f9 f9 f9 f9 f9 f9 00 07 f9 f9 f9 f9 f9 f9
                                                       ^
 ffffffff8bd63880: 00 07 f9 f9 f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9
 ffffffff8bd63900: 06 f9 f9 f9 f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9
==================================================================
----------------
Code disassembly (best guess), 2 bytes skipped:
   0:	10 06                	adc    %al,(%rsi)
   2:	03 74 b4 01          	add    0x1(%rsp,%rsi,4),%esi
   6:	10 07                	adc    %al,(%rdi)
   8:	03 74 b0 01          	add    0x1(%rax,%rsi,4),%esi
   c:	10 08                	adc    %cl,(%rax)
   e:	03 74 d8 01          	add    0x1(%rax,%rbx,8),%esi
  1e:	00 51 52             	add    %dl,0x52(%rcx)
  21:	55                   	push   %rbp
  22:	89 e5                	mov    %esp,%ebp
  24:	0f 34                	sysenter
  26:	cd 80                	int    $0x80
* 28:	5d                   	pop    %rbp <-- trapping instruction
  29:	5a                   	pop    %rdx
  2a:	59                   	pop    %rcx
  2b:	c3                   	ret
  2c:	90                   	nop
  2d:	90                   	nop
  2e:	90                   	nop
  2f:	90                   	nop
  30:	8d b4 26 00 00 00 00 	lea    0x0(%rsi,%riz,1),%esi
  37:	8d b4 26 00 00 00 00 	lea    0x0(%rsi,%riz,1),%esi

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/22 01:13 upstream a3daad821514 d34966d1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 KASAN: global-out-of-bounds Read in soft_cursor
* Struck through repros no longer work on HEAD.