syzbot


WARNING in iov_iter_revert

Status: upstream: reported C repro on 2023/08/13 18:12
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+abcce97fe7b7c391e348@syzkaller.appspotmail.com
First crash: 260d, last: 206d
Fix commit to backport (bisect log) :
tree: upstream
commit aa3dbde878961dd333cdd3c326b93e6c84a23ed4
Author: David Howells <dhowells@redhat.com>
Date: Mon May 22 13:49:54 2023 +0000

  splice: Make splice from an O_DIRECT fd use copy_splice_read()

  
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: WARNING in iov_iter_revert (log)
Repro: C syz .config
  
Bug presence (2)
Date Name Commit Repro Result
2023/08/13 linux-6.1.y (ToT) 1321ab403b38 C [report] WARNING in iov_iter_revert
2023/08/13 upstream (ToT) 4c75bf7e4a0e C Didn't crash
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in iov_iter_revert net C 74 2112d 2179d 8/26 fixed on 2018/08/07 13:43
upstream WARNING in iov_iter_revert (2) serial C done 9 1167d 1169d 20/26 fixed on 2021/04/09 19:46
upstream WARNING in iov_iter_revert (4) ntfs3 C done error 4 275d 327d 0/26 auto-obsoleted due to no activity on 2023/11/08 23:39
upstream WARNING in iov_iter_revert (3) ntfs3 C error error 26 463d 522d 0/26 auto-obsoleted due to no activity on 2023/05/23 03:07
linux-5.15 WARNING in iov_iter_revert origin:lts-only C done 1 291d 307d 0/3 upstream: reported C repro on 2023/06/28 09:07
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2023/10/09 08:28 4h36m fix candidate upstream job log (1)
2023/10/07 08:38 1h03m bisect fix linux-6.1.y job log (0) log

Sample crash report:
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 21 18 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdb17a94c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007ffdb17a94f0 RCX: 00007fdba92b91e9
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000004
RBP: 0000000000000002 R08: 00007ffdb17a9266 R09: 00007ffdb17a9510
R10: 0000000100000000 R11: 0000000000000246 R12: 00007ffdb17a94ec
R13: 0000000000000001 R14: 431bde82d7b634db R15: 00007ffdb17a9530
 </TASK>
------------[ cut here ]------------
WARNING: CPU: 0 PID: 3510 at lib/iov_iter.c:918 iov_iter_revert+0x382/0x830
Modules linked in:
CPU: 0 PID: 3510 Comm: syz-executor164 Not tainted 6.1.45-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
RIP: 0010:iov_iter_revert+0x382/0x830 lib/iov_iter.c:918
Code: 80 3c 01 00 48 8b 5c 24 18 74 08 48 89 df e8 55 4f ad fd 4c 89 2b 48 83 c4 60 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 1e bc 56 fd <0f> 0b eb e8 48 8d 6b 18 48 89 e8 48 c1 e8 03 42 80 3c 28 00 74 08
RSP: 0018:ffffc90003aaf7f0 EFLAGS: 00010293
RAX: ffffffff843341e2 RBX: ffffc90003aaf980 RCX: ffff888027cebb80
RDX: 0000000000000000 RSI: ffffffffffff1000 RDI: 000000007ffff000
RBP: ffffffffffff1000 R08: ffffffff84333e9c R09: fffffbfff1a407a3
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffffffff1000
R13: ffffc90003aaf980 R14: ffffc90003aaf990 R15: 0000000000000000
FS:  000055555669a380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fdba93500f8 CR3: 0000000013724000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 generic_file_read_iter+0x3d7/0x540 mm/filemap.c:2805
 call_read_iter include/linux/fs.h:2199 [inline]
 generic_file_splice_read+0x23c/0x630 fs/splice.c:309
 do_splice_to fs/splice.c:793 [inline]
 splice_direct_to_actor+0x408/0xbd0 fs/splice.c:865
 do_splice_direct+0x27f/0x3c0 fs/splice.c:974
 do_sendfile+0x61c/0xff0 fs/read_write.c:1255
 __do_sys_sendfile64 fs/read_write.c:1323 [inline]
 __se_sys_sendfile64+0x178/0x1e0 fs/read_write.c:1309
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fdba92b91e9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 21 18 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdb17a94c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007ffdb17a94f0 RCX: 00007fdba92b91e9
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000004
RBP: 0000000000000002 R08: 00007ffdb17a9266 R09: 00007ffdb17a9510
R10: 0000000100000000 R11: 0000000000000246 R12: 00007ffdb17a94ec
R13: 0000000000000001 R14: 431bde82d7b634db R15: 00007ffdb17a9530
 </TASK>
----------------
Code disassembly (best guess):
   0:	28 00                	sub    %al,(%rax)
   2:	00 00                	add    %al,(%rax)
   4:	75 05                	jne    0xb
   6:	48 83 c4 28          	add    $0x28,%rsp
   a:	c3                   	ret
   b:	e8 21 18 00 00       	call   0x1831
  10:	90                   	nop
  11:	48 89 f8             	mov    %rdi,%rax
  14:	48 89 f7             	mov    %rsi,%rdi
  17:	48 89 d6             	mov    %rdx,%rsi
  1a:	48 89 ca             	mov    %rcx,%rdx
  1d:	4d 89 c2             	mov    %r8,%r10
  20:	4d 89 c8             	mov    %r9,%r8
  23:	4c 8b 4c 24 08       	mov    0x8(%rsp),%r9
  28:	0f 05                	syscall
* 2a:	48 3d 01 f0 ff ff    	cmp    $0xfffffffffffff001,%rax <-- trapping instruction
  30:	73 01                	jae    0x33
  32:	c3                   	ret
  33:	48 c7 c1 b8 ff ff ff 	mov    $0xffffffffffffffb8,%rcx
  3a:	f7 d8                	neg    %eax
  3c:	64 89 01             	mov    %eax,%fs:(%rcx)
  3f:	48                   	rex.W

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/13 18:12 linux-6.1.y 1321ab403b38 39990d51 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan WARNING in iov_iter_revert
* Struck through repros no longer work on HEAD.