syzbot


general protection fault in n_tty_receive_buf_common (2)

Status: premoderation: reported on 2024/07/21 14:40
Reported-by: syzbot+2eaf8aecef8dbb7ad34c@syzkaller.appspotmail.com
First crash: 48d, last: 33d
Similar bugs (4)
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 416d 997d 0/27 auto-obsoleted due to no activity on 2023/09/27 16:27
upstream general protection fault in n_tty_receive_buf_common (2) serial 8 4d05h 44d 0/27 upstream: reported on 2024/07/25 04:27
android-6-1 general protection fault in n_tty_receive_buf_common 1 198d 198d 0/2 auto-obsoleted due to no activity on 2024/05/22 15:27
upstream general protection fault in n_tty_receive_buf_common serial 48 2124d 2507d 0/27 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: 343 Comm: kworker/u4:4 Tainted: G        W          6.1.90-syzkaller-00127-g6aafd06a463b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/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 79 da e9 fe 48 8b 9d 38 ff ff ff 4c 8b a3
RSP: 0018:ffffc9000b3d7a98 EFLAGS: 00010202
RAX: 000000000000044c RBX: ffff8881180de1f8 RCX: 0000000000000001
RDX: ffff88810ebea880 RSI: 0000000000000001 RDI: 0000000000002260
RBP: ffffc9000b3d7bd0 R08: ffffffff82d2e54f R09: ffffed102301bc20
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88811c69d025
R13: ffff8881180de000 R14: dffffc0000000000 R15: ffff8881180de2b8
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000013e942000 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:386
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </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 79 da e9 fe 48 8b 9d 38 ff ff ff 4c 8b a3
RSP: 0018:ffffc9000b3d7a98 EFLAGS: 00010202

RAX: 000000000000044c RBX: ffff8881180de1f8 RCX: 0000000000000001
RDX: ffff88810ebea880 RSI: 0000000000000001 RDI: 0000000000002260
RBP: ffffc9000b3d7bd0 R08: ffffffff82d2e54f R09: ffffed102301bc20
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88811c69d025
R13: ffff8881180de000 R14: dffffc0000000000 R15: ffff8881180de2b8
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005638adc5a748 CR3: 000000010f376000 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 79 da e9 fe       	call   0xfee9daad
  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 (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/05 01:49 android14-6.1 6aafd06a463b 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in n_tty_receive_buf_common
2024/07/21 14:53 android14-6.1 6d6afa9d3f8f b88348e9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 general protection fault in n_tty_receive_buf_common
2024/07/21 14:39 android14-6.1 6d6afa9d3f8f b88348e9 .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.