syzbot


kernel panic: stack is corrupted in run_unpack_ex

Status: fixed on 2024/02/24 00:02
Subsystems: ntfs3
[Documentation on labels]
Reported-by: syzbot+ba698041fcdf4d0214bb@syzkaller.appspotmail.com
Fix commit: 6f861765464f fs: Block writes to mounted block devices
First crash: 646d, last: 284d
Cause bisection: introduced by (bisect log) :
commit ad26a9c84510af7252e582e811de970433a9758f
Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Date: Fri Oct 7 17:08:06 2022 +0000

  fs/ntfs3: Fixing wrong logic in attr_set_size and ntfs_fallocate

Crash: KASAN: out-of-bounds Write in end_buffer_read_sync (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 (1)
Title Replies (including bot) Last reply
[syzbot] [ntfs3?] kernel panic: stack is corrupted in run_unpack_ex 1 (3) 2024/02/21 10:23
Last patch testing requests (3)
Created Duration User Patch Repo Result
2023/09/26 21:12 22m retest repro upstream report log
2023/09/15 09:58 21m yuran.pereira@hotmail.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log
2023/09/15 01:46 22m yuran.pereira@hotmail.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log
Fix bisection attempts (11)
Created Duration User Patch Repo Result
2024/02/20 07:10 7h54m bisect fix upstream OK (1) job log
2023/12/31 12:44 2h03m bisect fix upstream OK (0) job log log
2023/12/01 10:16 1h47m bisect fix upstream OK (0) job log log
2023/10/30 17:39 2h32m bisect fix upstream OK (0) job log log
2023/09/28 15:59 2h22m bisect fix upstream OK (0) job log log
2023/07/18 06:56 2h25m bisect fix upstream OK (0) job log log
2023/06/07 03:33 36m bisect fix upstream OK (0) job log log
2023/05/08 02:47 32m bisect fix upstream OK (0) job log log
2023/04/08 01:17 26m bisect fix upstream OK (0) job log log
2023/03/08 21:57 26m bisect fix upstream OK (0) job log log
2023/02/06 21:25 25m bisect fix upstream OK (0) job log log

Sample crash report:
ntfs3: loop0: Different NTFS' sector size (4096) and media sector size (512)
Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: run_unpack_ex+0x803/0x810
CPU: 1 PID: 5145 Comm: syz-executor322 Not tainted 6.2.0-rc2-syzkaller-00057-g41c03ba9beea #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 panic+0x316/0x770 kernel/panic.c:318
 __stack_chk_fail+0x12/0x20 kernel/panic.c:746
 run_unpack_ex+0x803/0x810
 attr_load_runs fs/ntfs3/attrib.c:81 [inline]
 attr_set_size+0x1022/0x4110 fs/ntfs3/attrib.c:500
 ntfs_set_size+0x17d/0x210 fs/ntfs3/inode.c:823
 ntfs_extend+0x169/0x4b0 fs/ntfs3/file.c:337
 ntfs_file_write_iter+0x301/0x6c0 fs/ntfs3/file.c:1064
 do_iter_write+0x6f0/0xc50 fs/read_write.c:861
 iter_file_splice_write+0x830/0xff0 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0xe6/0x1c0 fs/splice.c:931
 splice_direct_to_actor+0x4e4/0xc00 fs/splice.c:886
 do_splice_direct+0x2a0/0x3f0 fs/splice.c:974
 do_sendfile+0x641/0xfd0 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+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f2d28b0b249
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 01 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff179130d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 000000000001a41e RCX: 00007f2d28b0b249
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004
RBP: 0000000000000000 R08: 00007fff17913140 R09: 00007fff17913140
R10: 00008400fffffffa R11: 0000000000000246 R12: 00007fff1791310c
R13: 00007fff17913140 R14: 00007fff17913120 R15: 000000000000004e
 </TASK>
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/05 21:54 upstream 41c03ba9beea 1dac8c7a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root kernel panic: stack is corrupted in run_unpack_ex
2023/01/07 05:05 upstream a689b938df39 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel panic: stack is corrupted in run_unpack_ex
2023/01/03 07:59 upstream 69b41ac87e4a ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root kernel panic: stack is corrupted in run_unpack_ex
* Struck through repros no longer work on HEAD.