syzbot


WARNING in wnd_add_free_ext (3)

Status: upstream: reported C repro on 2024/08/15 04:43
Subsystems: ntfs3
[Documentation on labels]
Reported-by: syzbot+7f3761b790fa41d0f3d5@syzkaller.appspotmail.com
Fix commit: 5fc982fe7eca fs/ntfs3: Fix case when unmarked clusters intersect with zone
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-arm32]
First crash: 169d, last: 12d
Cause bisection: introduced by (bisect log) :
commit 8335ebe195dcc76ece418485a9f08b9a9ad7fe23
Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Date: Thu Jul 7 16:25:43 2022 +0000

  fs/ntfs3: Make MFT zone less fragmented

Crash: WARNING in wnd_add_free_ext (log)
Repro: C syz .config
  
Discussions (5)
Title Replies (including bot) Last reply
[PATCH AUTOSEL 6.6] fs/ntfs3: Fix case when unmarked clusters intersect with zone 1 (1) 2024/12/04 22:15
[PATCH AUTOSEL 6.11 1/2] fs/ntfs3: Fix case when unmarked clusters intersect with zone 1 (1) 2024/12/04 22:15
[PATCH AUTOSEL 6.12 2/3] fs/ntfs3: Fix case when unmarked clusters intersect with zone 1 (1) 2024/12/04 22:15
[PATCH 2/7] fs/ntfs3: Fix case when unmarked clusters intersect with zone 1 (1) 2024/11/01 08:17
[syzbot] [ntfs3?] WARNING in wnd_add_free_ext (3) 0 (1) 2024/08/15 04:43
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 WARNING in wnd_add_free_ext origin:upstream missing-backport C inconclusive 15 102d 532d 0/3 upstream: reported C repro on 2023/08/15 03:08
linux-5.15 WARNING in wnd_add_free_ext origin:upstream missing-backport C error 2 25d 523d 0/3 upstream: reported C repro on 2023/08/23 21:49
upstream WARNING in wnd_add_free_ext (2) ntfs3 C done done 16 466d 572d 0/28 auto-obsoleted due to no activity on 2024/01/24 12:23
upstream WARNING in wnd_add_free_ext ntfs3 2 738d 762d 0/28 auto-obsoleted due to no activity on 2023/05/20 17:24
Last patch testing requests (3)
Created Duration User Patch Repo Result
2024/08/25 19:48 15m retest repro upstream report log
2024/08/25 19:48 15m retest repro upstream report log
2024/08/25 19:48 20m retest repro upstream report log

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5226 at fs/ntfs3/bitmap.c:217 rb_insert_start fs/ntfs3/bitmap.c:217 [inline]
WARNING: CPU: 1 PID: 5226 at fs/ntfs3/bitmap.c:217 wnd_add_free_ext+0xaba/0xd60 fs/ntfs3/bitmap.c:352
Modules linked in:
CPU: 1 UID: 0 PID: 5226 Comm: syz-executor330 Not tainted 6.11.0-rc2-syzkaller-00257-g5189dafa4cf9 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
RIP: 0010:rb_insert_start fs/ntfs3/bitmap.c:217 [inline]
RIP: 0010:wnd_add_free_ext+0xaba/0xd60 fs/ntfs3/bitmap.c:352
Code: 00 fc ff df 80 3c 28 00 74 08 48 89 df e8 2e be 14 ff 48 8b 7c 24 08 48 89 3b 4c 89 f6 e8 fe 08 c3 08 eb 13 e8 a7 9c b0 fe 90 <0f> 0b 90 48 bd 00 00 00 00 00 fc ff df 48 8b 44 24 38 80 3c 28 00
RSP: 0018:ffffc900035df008 EFLAGS: 00010293

RAX: ffffffff82e2da99 RBX: 0000000000000603 RCX: ffff8880243b9e00
RDX: 0000000000000000 RSI: 0000000000000603 RDI: 0000000000000603
RBP: 0000000000000603 R08: ffffffff82e2d9d2 R09: 0000000000000000
R10: ffff88801198cc88 R11: ffffed1002331993 R12: ffff88801186c7e0
R13: ffff88801186c7e0 R14: ffff8880245182d8 R15: 1ffff1100233198f
FS:  00007fc6ce16d6c0(0000) GS:ffff8880b9300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000002363a000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 wnd_zone_set+0xa6/0x160 fs/ntfs3/bitmap.c:1421
 mark_as_free_ex+0x30d/0x390
 run_deallocate_ex+0x244/0x5f0 fs/ntfs3/attrib.c:122
 attr_set_size+0x168d/0x4300 fs/ntfs3/attrib.c:753
 ntfs_truncate fs/ntfs3/file.c:459 [inline]
 ntfs3_setattr+0x7a4/0xb80 fs/ntfs3/file.c:775
 notify_change+0xb9d/0xe70 fs/attr.c:495
 do_truncate+0x220/0x310 fs/open.c:65
 handle_truncate fs/namei.c:3381 [inline]
 do_open fs/namei.c:3731 [inline]
 path_openat+0x2ced/0x3470 fs/namei.c:3886
 do_filp_open+0x235/0x490 fs/namei.c:3913
 do_sys_openat2+0x13e/0x1d0 fs/open.c:1416
 do_sys_open fs/open.c:1431 [inline]
 __do_sys_openat fs/open.c:1447 [inline]
 __se_sys_openat fs/open.c:1442 [inline]
 __x64_sys_openat+0x247/0x2a0 fs/open.c:1442
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83

Crashes (16):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/11 19:34 upstream 5189dafa4cf9 6f4edef4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] [mounted in repro #3] ci2-upstream-fs WARNING in wnd_add_free_ext
2024/08/11 16:31 upstream 5189dafa4cf9 6f4edef4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] [mounted in repro #3] [mounted in repro #4] ci2-upstream-fs WARNING in wnd_add_free_ext
2024/08/11 13:08 upstream 5189dafa4cf9 6f4edef4 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] [mounted in repro #3] ci2-upstream-fs WARNING in wnd_add_free_ext
2024/11/24 00:06 upstream 228a1157fb9f 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_add_free_ext
2024/10/15 14:42 upstream eca631b8fe80 7eb57b4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_add_free_ext
2024/10/15 06:13 upstream eca631b8fe80 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_add_free_ext
2024/10/11 13:28 upstream 1d227fcc7222 cd942402 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_add_free_ext
2024/10/08 03:06 upstream 87d6aab2389e d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_add_free_ext
2024/09/09 18:13 upstream da3ea35007d0 073f8be2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_add_free_ext
2024/09/04 16:07 upstream 88fac17500f4 9d47f20a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_add_free_ext
2024/08/11 04:38 upstream 34ac1e82e5a7 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING in wnd_add_free_ext
2025/01/16 00:50 upstream 619f0b6fad52 968edaf4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in wnd_add_free_ext
2024/11/29 05:02 upstream 65ae975e97d5 5df23865 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in wnd_add_free_ext
2024/10/27 02:33 upstream 850925a8133c 65e8686b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in wnd_add_free_ext
2024/11/30 08:49 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7b1d1d4cfac0 68914665 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in wnd_add_free_ext
2024/10/23 22:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci df1aa7b14127 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in wnd_add_free_ext
* Struck through repros no longer work on HEAD.