syzbot


KASAN: null-ptr-deref Write in xfs_filestream_select_ag

Status: auto-obsoleted due to no activity on 2024/04/02 22:17
Subsystems: xfs
[Documentation on labels]
Reported-by: syzbot+87466712bb342796810a@syzkaller.appspotmail.com
First crash: 388d, last: 110d
Cause bisection: introduced by (bisect log) :
commit 3e43877a9dac13771ac722462c87bea0bdc50759
Author: Dave Chinner <dchinner@redhat.com>
Date: Sun Feb 12 22:14:55 2023 +0000

  xfs: remove xfs_filestream_select_ag() longest extent check

Crash: general protection fault in xfs_filestream_select_ag (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 6f861765464f43a71462d52026fbddfc858239a5
Author: Jan Kara <jack@suse.cz>
Date: Wed Nov 1 17:43:10 2023 +0000

  fs: Block writes to mounted block devices

  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [xfs?] KASAN: null-ptr-deref Write in xfs_filestream_select_ag 2 (4) 2024/01/24 11:08
[syzbot] Monthly xfs report (May 2023) 1 (2) 2023/05/05 13:59
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/09/18 16:49 17m retest repro upstream OK log
2023/08/27 19:44 59m retest repro upstream OK log
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2024/01/24 03:38 5h10m bisect fix upstream job log (1)
2023/12/24 21:01 1h14m bisect fix upstream job log (0) log
2023/11/23 21:41 1h21m bisect fix upstream job log (0) log
2023/10/21 07:57 1h24m bisect fix upstream job log (0) log
2023/09/19 23:56 1h24m bisect fix upstream job log (0) log
2023/07/10 14:15 1h45m bisect fix upstream job log (0) log

Sample crash report:
XFS (loop0): metadata I/O error in "xfs_read_agf+0x2c9/0x600" at daddr 0x1 len 1 error 117
XFS (loop0): page discard on page ffffea0001c573c0, inode 0x2a, pos 0.
==================================================================
BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:102 [inline]
BUG: KASAN: null-ptr-deref in atomic_inc include/linux/atomic/atomic-instrumented.h:190 [inline]
BUG: KASAN: null-ptr-deref in xfs_filestream_pick_ag fs/xfs/xfs_filestream.c:156 [inline]
BUG: KASAN: null-ptr-deref in xfs_filestream_create_association fs/xfs/xfs_filestream.c:301 [inline]
BUG: KASAN: null-ptr-deref in xfs_filestream_select_ag+0x14e5/0x1ca0 fs/xfs/xfs_filestream.c:372
Write of size 4 at addr 00000000000001c0 by task kworker/u4:3/47

CPU: 0 PID: 47 Comm: kworker/u4:3 Not tainted 6.3.0-rc3-syzkaller-00012-g17214b70a159 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: writeback wb_workfn (flush-7:0)
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
 print_report+0xe6/0x540 mm/kasan/report.c:433
 kasan_report+0x176/0x1b0 mm/kasan/report.c:536
 kasan_check_range+0x283/0x290 mm/kasan/generic.c:187
 instrument_atomic_read_write include/linux/instrumented.h:102 [inline]
 atomic_inc include/linux/atomic/atomic-instrumented.h:190 [inline]
 xfs_filestream_pick_ag fs/xfs/xfs_filestream.c:156 [inline]
 xfs_filestream_create_association fs/xfs/xfs_filestream.c:301 [inline]
 xfs_filestream_select_ag+0x14e5/0x1ca0 fs/xfs/xfs_filestream.c:372
 xfs_bmap_btalloc_filestreams fs/xfs/libxfs/xfs_bmap.c:3558 [inline]
 xfs_bmap_btalloc+0xffa/0x28a0 fs/xfs/libxfs/xfs_bmap.c:3672
 xfs_bmapi_allocate+0x647/0xf30
 xfs_bmapi_convert_delalloc+0x98f/0x1310 fs/xfs/libxfs/xfs_bmap.c:4554
 xfs_convert_blocks fs/xfs/xfs_aops.c:266 [inline]
 xfs_map_blocks+0x780/0x1090 fs/xfs/xfs_aops.c:389
 iomap_writepage_map fs/iomap/buffered-io.c:1641 [inline]
 iomap_do_writepage+0x941/0x2ee0 fs/iomap/buffered-io.c:1803
 write_cache_pages+0x89e/0x12c0 mm/page-writeback.c:2473
 iomap_writepages+0x68/0x240 fs/iomap/buffered-io.c:1820
 xfs_vm_writepages+0x139/0x1a0 fs/xfs/xfs_aops.c:513
 do_writepages+0x3a6/0x670 mm/page-writeback.c:2551
 __writeback_single_inode+0x155/0xfb0 fs/fs-writeback.c:1600
 writeback_sb_inodes+0x8ef/0x11d0 fs/fs-writeback.c:1891
 wb_writeback+0x458/0xc70 fs/fs-writeback.c:2065
 wb_do_writeback fs/fs-writeback.c:2208 [inline]
 wb_workfn+0x400/0xff0 fs/fs-writeback.c:2248
 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2390
 worker_thread+0xa63/0x1210 kernel/workqueue.c:2537
 kthread+0x270/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
==================================================================

Crashes (18):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/21 19:13 upstream 17214b70a159 8b4eb097 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/06/07 03:19 upstream a4d7d7011219 a4ae4f42 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/05/14 09:01 upstream bb7c241fae62 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/05/13 00:22 upstream cc3c44c9fda2 ecca8a24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/05/12 10:25 upstream 105131df9c3b adb9a3cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/05/11 02:02 upstream d295b66a7b66 14b12a99 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/05/10 03:41 upstream 1dc3731daf1f 30aa2a7e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/05/02 20:16 upstream 865fdb08197e 48e0a81d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/04/29 13:36 upstream 89d77f71f493 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/04/21 23:33 upstream 2af3e53a4dc0 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/04/16 09:05 upstream a7a55e27ad72 ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/04/15 03:38 upstream 95abc817ab3a ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/04/13 08:18 upstream 0bcc40255504 82d5e53e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/04/06 19:14 upstream 99ddf2254feb 08707520 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/04/06 01:54 upstream 99ddf2254feb 8b834965 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/03/31 15:34 upstream 62bad54b26db f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/03/29 12:43 upstream fcd476ea6a88 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
2023/03/21 18:34 upstream 17214b70a159 8b4eb097 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs KASAN: null-ptr-deref Write in xfs_filestream_select_ag
* Struck through repros no longer work on HEAD.