syzbot


kernel BUG in __filemap_get_folio

Status: fixed on 2023/02/24 13:50
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+cf4cf13056f85dec2c40@syzkaller.appspotmail.com
Fix commit: 63b1898fffcd XArray: Disallow sibling entries of nodes
First crash: 770d, last: 599d
Cause bisection: introduced by (bisect log) :
commit 6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3
Author: Matthew Wilcox (Oracle) <willy@infradead.org>
Date: Sun Jun 28 02:19:08 2020 +0000

  mm: Use multi-index entries in the page cache

Crash: kernel BUG in __filemap_get_folio (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH 5.17 000/146] 5.17.5-rc1 review 156 (156) 2022/04/27 10:01
[syzbot] kernel BUG in __filemap_get_folio 2 (4) 2022/04/22 19:34
Similar bugs (10)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in find_lock_entries mm C done 10 861d 1023d 20/26 fixed on 2022/03/08 16:11
upstream kernel BUG in __filemap_get_folio (2) hfs 1 390d 386d 0/26 auto-obsoleted due to no activity on 2023/08/23 09:09
upstream kernel BUG at mm/filemap.c:LINE! (2) mm 1 1291d 1287d 0/26 auto-closed as invalid on 2021/03/15 06:14
android-44 kernel BUG at mm/filemap.c:LINE! C 1082 2100d 1875d 0/2 public: reported C repro on 2019/04/11 08:44
upstream kernel BUG at mm/filemap.c:LINE! fs 1 1920d 1920d 0/26 auto-closed as invalid on 2019/08/24 03:17
upstream kernel BUG in folio_unlock mm 1 402d 398d 0/26 auto-obsoleted due to no activity on 2023/06/22 15:13
upstream kernel BUG in folio_unlock (2) btrfs C error 11 9d03h 27d 0/26 upstream: reported C repro on 2024/05/02 16:24
upstream kernel BUG in filemap_unaccount_folio mm C done 36 13h19m 266d 0/26 upstream: reported C repro on 2023/09/06 18:51
linux-6.1 kernel BUG in filemap_unaccount_folio origin:upstream C 6 27d 168d 0/3 upstream: reported C repro on 2023/12/13 08:56
linux-5.15 kernel BUG in find_lock_entries 1 410d 410d 0/3 auto-obsoleted due to no activity on 2023/08/13 14:38
Last patch testing requests (6)
Created Duration User Patch Repo Result
2022/04/22 18:30 17m willy@infradead.org git://git.infradead.org/users/willy/xarray.git main OK
2022/04/22 12:52 17m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ 559089e0a93d OK
2022/04/22 12:17 9m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ 559089e0a93d report log
2022/04/22 07:04 9m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ 559089e0a93d report log
2022/04/22 02:30 9m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ 559089e0a93d report log
2022/04/22 00:14 9m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ 559089e0a93d report log

Sample crash report:
 do_initcall_level init/main.c:1371 [inline]
 do_initcalls init/main.c:1387 [inline]
 do_basic_setup init/main.c:1406 [inline]
 kernel_init_freeable+0x6b1/0x73a init/main.c:1613
 kernel_init+0x1a/0x1d0 init/main.c:1502
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
------------[ cut here ]------------
kernel BUG at mm/filemap.c:1971!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3867 Comm: syz-executor935 Not tainted 5.18.0-rc3-syzkaller-00007-g559089e0a93d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__filemap_get_folio+0xc65/0xf00 mm/filemap.c:1971
Code: db 45 31 f6 e9 fd f5 ff ff 44 8b 6c 24 10 48 89 eb e9 f0 f5 ff ff e8 ba f5 d8 ff 48 c7 c6 80 d9 d5 89 48 89 df e8 6b 8d 0e 00 <0f> 0b e8 a4 f5 d8 ff 48 89 df 31 db e8 4a af 03 00 e9 78 f7 ff ff
RSP: 0018:ffffc900033d78b0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffea00014c8dc0 RCX: 0000000000000000
RDX: ffff88807bb560c0 RSI: ffffffff819f5865 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000018 R09: 00000000ffffffff
R10: ffffffff891d5eec R11: 00000000ffffffff R12: 0000000000000180
R13: 0000000000000182 R14: 0000000000000000 R15: dffffc0000000000
FS:  00007f78863e0700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002013f000 CR3: 0000000075648000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 pagecache_get_page+0x2e/0x290 mm/folio-compat.c:126
 shmem_getpage_gfp+0x471/0x2370 mm/shmem.c:1812
 shmem_getpage mm/shmem.c:149 [inline]
 shmem_write_begin+0xff/0x1e0 mm/shmem.c:2446
 generic_perform_write+0x249/0x560 mm/filemap.c:3787
 __generic_file_write_iter+0x2aa/0x4d0 mm/filemap.c:3915
 generic_file_write_iter+0xd7/0x220 mm/filemap.c:3947
 call_write_iter include/linux/fs.h:2050 [inline]
 new_sync_write+0x38a/0x560 fs/read_write.c:504
 vfs_write+0x7c0/0xac0 fs/read_write.c:591
 ksys_write+0x127/0x250 fs/read_write.c:644
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f78864331c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 15 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:00007f78863e0308 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f78864b73e8 RCX: 00007f78864331c9
RDX: 000000000208e24b RSI: 0000000020000080 RDI: 0000000000000004
RBP: 00007f78864b73e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f78864b73ec
R13: 00007f78864840ac R14: 776c613d65677568 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__filemap_get_folio+0xc65/0xf00 mm/filemap.c:1971
Code: db 45 31 f6 e9 fd f5 ff ff 44 8b 6c 24 10 48 89 eb e9 f0 f5 ff ff e8 ba f5 d8 ff 48 c7 c6 80 d9 d5 89 48 89 df e8 6b 8d 0e 00 <0f> 0b e8 a4 f5 d8 ff 48 89 df 31 db e8 4a af 03 00 e9 78 f7 ff ff
RSP: 0018:ffffc900033d78b0 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffffea00014c8dc0 RCX: 0000000000000000
RDX: ffff88807bb560c0 RSI: ffffffff819f5865 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000018 R09: 00000000ffffffff
R10: ffffffff891d5eec R11: 00000000ffffffff R12: 0000000000000180
R13: 0000000000000182 R14: 0000000000000000 R15: dffffc0000000000
FS:  00007f78863e0700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020800000 CR3: 0000000075648000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (814):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/04/20 04:16 upstream 559089e0a93d 7d7bc738 .config console log report syz C ci-upstream-kasan-gce-selinux-root kernel BUG in __filemap_get_folio
2022/04/22 00:13 upstream 59f0c2447e25 2738b391 .config console log report info ci-upstream-kasan-gce-smack-root kernel BUG in __filemap_get_folio
2022/04/21 00:37 upstream b253435746d9 d4befee1 .config console log report info ci-upstream-kasan-gce-selinux-root kernel BUG in __filemap_get_folio
2022/04/19 22:35 upstream 559089e0a93d 7d7bc738 .config console log report info ci-upstream-kasan-gce-selinux-root kernel BUG in __filemap_get_folio
2022/10/08 05:56 upstream 62e6e5940c0c aea5da89 .config console log report info [disk image] [vmlinux] ci2-upstream-fs kernel BUG in find_lock_entries
2022/09/19 19:57 upstream 521a547ced64 dd9a85ff .config console log report info ci-upstream-kasan-gce-smack-root kernel BUG in find_lock_entries
2022/09/15 20:03 linux-next e47eb90a0a9a dd9a85ff .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root kernel BUG in filemap_unaccount_folio
2022/06/27 05:36 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/27 05:17 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/27 03:22 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/27 02:29 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/27 01:17 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 23:32 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 22:25 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 20:15 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 18:53 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 17:50 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 15:47 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 14:29 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 12:40 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 11:36 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 10:52 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 09:18 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 08:07 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 06:45 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 05:48 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 05:02 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 03:58 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 02:55 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 01:56 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/26 00:52 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 23:49 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 23:38 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 22:33 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 21:27 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 19:50 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 18:14 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 17:13 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 15:13 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 15:01 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 13:59 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 13:50 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 12:40 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 11:34 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 11:13 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 09:52 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 08:49 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 08:09 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2022/06/25 06:40 linux-next 2f9cb3d3bd73 a371c43c .config console log report info ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
* Struck through repros no longer work on HEAD.