syzbot


WARNING in iov_iter_revert (2)

Status: fixed on 2021/04/09 19:46
Reported-by: syzbot+3d2c27c2b7dc2a94814d@syzkaller.appspotmail.com
Fix commit: 3342ff2698e9 tty: protect tty_write from odd low-level tty disciplines
First crash: 505d, last: 500d

Cause bisection: introduced by (bisect log) :
commit 9bb48c82aced07698a2d08ee0f1475a6c4f6b266
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Tue Jan 19 19:41:16 2021 +0000

  tty: implement write_iter

Crash: WARNING in iov_iter_revert (log)
Repro: C syz .config
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in iov_iter_revert C 74 1445d 1511d 9/22 fixed on 2018/08/07 13:43
Patch testing requests:
Created Duration User Patch Repo Result
2021/02/17 14:04 16m snovitoll@gmail.com https://linux.googlesource.com/linux/kernel/git/torvalds/linux refs/changes/76/8476/1 OK

Sample crash report:
[U] 
------------[ cut here ]------------
WARNING: CPU: 1 PID: 8461 at lib/iov_iter.c:1090 iov_iter_revert+0x2e3/0x8e0 lib/iov_iter.c:1090
Modules linked in:
CPU: 1 PID: 8461 Comm: syz-executor778 Not tainted 5.11.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:iov_iter_revert+0x2e3/0x8e0 lib/iov_iter.c:1090
Code: 05 00 00 45 8b 74 24 08 48 89 de 4c 89 6d 20 49 83 c5 01 4c 89 f7 e8 bc eb b4 fd 49 39 de 72 ba e9 2c ff ff ff e8 9d e5 b4 fd <0f> 0b e9 30 ff ff ff e8 91 e5 b4 fd 48 8d 7d 18 48 b8 00 00 00 00
RSP: 0018:ffffc9000168fc30 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffffffffffffff RCX: 0000000000000000
RDX: ffff88801b6c1bc0 RSI: ffffffff83bdef03 RDI: 0000000000000003
RBP: ffffc9000168fd68 R08: 000000007ffff000 R09: ffffffff8f86683f
R10: ffffffff83bdec5e R11: 0000000000000000 R12: 0000000000000001
R13: 0000000000000000 R14: ffffc9000168fd68 R15: ffff88801b6c1bc0
FS:  00000000016f5300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5d4c03d0d8 CR3: 0000000013adc000 CR4: 0000000000350ef0
Call Trace:
 do_tty_write drivers/tty/tty_io.c:967 [inline]
 file_tty_write.constprop.0+0x55f/0x8f0 drivers/tty/tty_io.c:1048
 call_write_iter include/linux/fs.h:1901 [inline]
 new_sync_write+0x426/0x650 fs/read_write.c:518
 vfs_write+0x791/0xa30 fs/read_write.c:605
 ksys_write+0x12d/0x250 fs/read_write.c:658
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x43ee99
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffc3cb0628 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee99
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000402e80 R08: 0000000000400488 R09: 0000000000400488
R10: 0000000000400488 R11: 0000000000000246 R12: 0000000000402f10
R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488

Crashes (9):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2021/02/12 16:37 upstream dcc0b49040c7 a5f86b15 .config log report syz C WARNING in iov_iter_revert
ci-upstream-kasan-gce 2021/02/12 16:37 upstream dcc0b49040c7 a5f86b15 .config log report syz C WARNING in iov_iter_revert
ci-upstream-kasan-gce-smack-root 2021/02/12 16:25 upstream dcc0b49040c7 a5f86b15 .config log report syz C WARNING in iov_iter_revert
ci-upstream-kasan-gce-selinux-root 2021/02/17 18:24 upstream f40ddce88593 052f8d9f .config log report info WARNING in iov_iter_revert
ci-upstream-kasan-gce-root 2021/02/12 16:21 upstream dcc0b49040c7 a5f86b15 .config log report info WARNING in iov_iter_revert
ci-upstream-kasan-gce 2021/02/12 16:18 upstream dcc0b49040c7 a5f86b15 .config log report info WARNING in iov_iter_revert
ci-upstream-kasan-gce-smack-root 2021/02/12 16:10 upstream dcc0b49040c7 a5f86b15 .config log report info WARNING in iov_iter_revert
ci-upstream-kasan-gce-386 2021/02/17 18:14 upstream f40ddce88593 052f8d9f .config log report info WARNING in iov_iter_revert
ci-upstream-kasan-gce-386 2021/02/12 16:28 upstream dcc0b49040c7 a5f86b15 .config log report info WARNING in iov_iter_revert