syzbot


general protection fault in n_tty_receive_buf_common

Status: premoderation: reported on 2024/02/22 15:26
Reported-by: syzbot+ff7d1d85a820bf287440@syzkaller.appspotmail.com
First crash: 75d, last: 75d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in n_tty_receive_buf_common (2) serial C 591 293d 874d 0/26 auto-obsoleted due to no activity on 2023/09/27 16:27
upstream general protection fault in n_tty_receive_buf_common (2) serial 3 22d 60d 0/26 moderation: reported on 2024/03/08 06:32
upstream general protection fault in n_tty_receive_buf_common serial 48 2001d 2384d 0/26 closed as dup on 2018/07/17 10:20

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000044c: 0000 [#1] PREEMPT SMP KASAN
KASAN: probably user-memory-access in range [0x0000000000002260-0x0000000000002267]
CPU: 0 PID: 43 Comm: kworker/u4:2 Not tainted 6.1.68-syzkaller-00026-ga7f647f49daf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: events_unbound flush_to_ldisc
RIP: 0010:n_tty_receive_buf_common+0x14b/0x1320 drivers/tty/n_tty.c:1690
Code: f8 01 00 00 49 be 00 00 00 00 00 fc ff df 48 89 c3 48 89 85 00 ff ff ff 4c 89 65 88 48 8b bd f0 fe ff ff 48 89 f8 48 c1 e8 03 <42> 80 3c 30 00 74 05 e8 69 f9 ea fe 48 8b 9d 38 ff ff ff 4c 8b a3
RSP: 0018:ffffc900002cfa98 EFLAGS: 00010202
RAX: 000000000000044c RBX: ffff88811b3e89f8 RCX: 0000000000000001
RDX: ffff8881003a6540 RSI: 0000000000000001 RDI: 0000000000002260
RBP: ffffc900002cfbd0 R08: ffffffff82d11b4f R09: ffffed102367d120
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88811b00d0c8
R13: ffff88811b3e8800 R14: dffffc0000000000 R15: ffff88811b3e8ab8
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f54a0502422 CR3: 000000010fd15000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1757
 tty_ldisc_receive_buf+0xa6/0x160 drivers/tty/tty_buffer.c:457
 tty_port_default_receive_buf+0x6f/0xa0 drivers/tty/tty_port.c:39
 receive_buf drivers/tty/tty_buffer.c:515 [inline]
 flush_to_ldisc+0x322/0x840 drivers/tty/tty_buffer.c:565
 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2299
 worker_thread+0xa60/0x1260 kernel/workqueue.c:2446
 kthread+0x26d/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:n_tty_receive_buf_common+0x14b/0x1320 drivers/tty/n_tty.c:1690
Code: f8 01 00 00 49 be 00 00 00 00 00 fc ff df 48 89 c3 48 89 85 00 ff ff ff 4c 89 65 88 48 8b bd f0 fe ff ff 48 89 f8 48 c1 e8 03 <42> 80 3c 30 00 74 05 e8 69 f9 ea fe 48 8b 9d 38 ff ff ff 4c 8b a3
RSP: 0018:ffffc900002cfa98 EFLAGS: 00010202
RAX: 000000000000044c RBX: ffff88811b3e89f8 RCX: 0000000000000001
RDX: ffff8881003a6540 RSI: 0000000000000001 RDI: 0000000000002260
RBP: ffffc900002cfbd0 R08: ffffffff82d11b4f R09: ffffed102367d120
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88811b00d0c8
R13: ffff88811b3e8800 R14: dffffc0000000000 R15: ffff88811b3e8ab8
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000159f4c000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 2 bytes skipped:
   0:	00 00                	add    %al,(%rax)
   2:	49 be 00 00 00 00 00 	movabs $0xdffffc0000000000,%r14
   9:	fc ff df
   c:	48 89 c3             	mov    %rax,%rbx
   f:	48 89 85 00 ff ff ff 	mov    %rax,-0x100(%rbp)
  16:	4c 89 65 88          	mov    %r12,-0x78(%rbp)
  1a:	48 8b bd f0 fe ff ff 	mov    -0x110(%rbp),%rdi
  21:	48 89 f8             	mov    %rdi,%rax
  24:	48 c1 e8 03          	shr    $0x3,%rax
* 28:	42 80 3c 30 00       	cmpb   $0x0,(%rax,%r14,1) <-- trapping instruction
  2d:	74 05                	je     0x34
  2f:	e8 69 f9 ea fe       	call   0xfeeaf99d
  34:	48 8b 9d 38 ff ff ff 	mov    -0xc8(%rbp),%rbx
  3b:	4c                   	rex.WR
  3c:	8b                   	.byte 0x8b
  3d:	a3                   	.byte 0xa3

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/22 15:25 android14-6.1 a7f647f49daf 345111b5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in n_tty_receive_buf_common
* Struck through repros no longer work on HEAD.