[v6.6] kernel panic: stack is corrupted in __schedule

2 views
Skip to first unread message

syzbot

unread,
Jun 17, 2025, 10:33:26 PM6/17/25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c2603c511feb Linux 6.6.93
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10662370580000
kernel config: https://syzkaller.appspot.com/x/.config?x=486bade17c8c30b9
dashboard link: https://syzkaller.appspot.com/bug?extid=8d8828a8f74bc9420fd9
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/8754f950a6e7/disk-c2603c51.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3b19332dbf63/vmlinux-c2603c51.xz
kernel image: https://storage.googleapis.com/syzbot-assets/cb245e836038/bzImage-c2603c51.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+8d8828...@syzkaller.appspotmail.com

loop7: detected capacity change from 0 to 4096
ntfs3: loop7: Different NTFS sector size (1024) and media sector size (512).
Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: __schedule+0x1818/0x4580 kernel/sched/core.c:-1
CPU: 1 PID: 25410 Comm: syz.7.4640 Not tainted 6.6.93-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
<TASK>
dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
panic+0x2c0/0x710 kernel/panic.c:340
__stack_chk_fail+0x25/0x30 kernel/panic.c:771
__schedule+0x1818/0x4580 kernel/sched/core.c:-1
preempt_schedule_irq+0xb5/0x140 kernel/sched/core.c:7010
irqentry_exit+0x67/0x70 kernel/entry/common.c:438
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:692
RIP: 0010:do_read_cache_folio+0x470/0x7e0 mm/filemap.c:3789
Code: e6 08 31 ff e8 b1 96 cf ff 48 83 e3 08 0f 85 a5 01 00 00 e8 62 92 cf ff 48 8b 7c 24 18 48 8b 74 24 08 48 89 ea e8 b0 c9 ff ff <41> 89 c6 31 ff 89 c6 e8 f4 95 cf ff 45 85 f6 0f 84 53 01 00 00 4c
RSP: 0018:ffffc9000465f918 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000100cca RCX: 1ffff920008cbf10
RDX: ffffc90011e4b000 RSI: 000000000001a1c8 RDI: 000000000001a1c9
RBP: ffffea00016d0cc0 R08: ffffea00016d0cc7 R09: 1ffffd40002da198
R10: dffffc0000000000 R11: fffff940002da199 R12: ffff888072e7dcf8
R13: ffff888072e7dcf8 R14: 0000000000000000 R15: dffffc0000000000
do_read_cache_page+0x32/0x250 mm/filemap.c:3855
read_mapping_page include/linux/pagemap.h:892 [inline]
ntfs_map_page+0x1d/0x60 fs/ntfs/aops.h:75
ntfs_fill_super+0x3415/0x42e0 fs/ntfs3/super.c:1434
get_tree_bdev+0x3e4/0x510 fs/super.c:1591
vfs_get_tree+0x8c/0x280 fs/super.c:1764
do_new_mount+0x24b/0xa40 fs/namespace.c:3355
do_mount fs/namespace.c:3695 [inline]
__do_sys_mount fs/namespace.c:3904 [inline]
__se_sys_mount+0x2da/0x3c0 fs/namespace.c:3881
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f535dd900ca
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f535ec83e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f535ec83ef0 RCX: 00007f535dd900ca
RDX: 0000200000000340 RSI: 0000200000000000 RDI: 00007f535ec83eb0
RBP: 0000200000000340 R08: 00007f535ec83ef0 R09: 0000000000800000
R10: 0000000000800000 R11: 0000000000000246 R12: 0000200000000000
R13: 00007f535ec83eb0 R14: 000000000001f85c R15: 0000200000000280
</TASK>
Kernel Offset: disabled
Rebooting in 86400 seconds..
----------------
Code disassembly (best guess):
0: e6 08 out %al,$0x8
2: 31 ff xor %edi,%edi
4: e8 b1 96 cf ff call 0xffcf96ba
9: 48 83 e3 08 and $0x8,%rbx
d: 0f 85 a5 01 00 00 jne 0x1b8
13: e8 62 92 cf ff call 0xffcf927a
18: 48 8b 7c 24 18 mov 0x18(%rsp),%rdi
1d: 48 8b 74 24 08 mov 0x8(%rsp),%rsi
22: 48 89 ea mov %rbp,%rdx
25: e8 b0 c9 ff ff call 0xffffc9da
* 2a: 41 89 c6 mov %eax,%r14d <-- trapping instruction
2d: 31 ff xor %edi,%edi
2f: 89 c6 mov %eax,%esi
31: e8 f4 95 cf ff call 0xffcf962a
36: 45 85 f6 test %r14d,%r14d
39: 0f 84 53 01 00 00 je 0x192
3f: 4c rex.WR


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Aug 26, 2025, 4:51:31 AM8/26/25
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: bb9c90ab9c5a Linux 6.6.102
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=138ef862580000
kernel config: https://syzkaller.appspot.com/x/.config?x=7b989b97a0687b0a
dashboard link: https://syzkaller.appspot.com/bug?extid=8d8828a8f74bc9420fd9
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=130b9c42580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1398e462580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/44e2224124c3/disk-bb9c90ab.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/33e0aef7ff42/vmlinux-bb9c90ab.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0515bc436228/bzImage-bb9c90ab.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/9800b1f1c805/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+8d8828...@syzkaller.appspotmail.com

loop3: detected capacity change from 0 to 4096
ntfs3: loop3: Different NTFS sector size (1024) and media sector size (512).
Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: __schedule+0x1808/0x44d0 kernel/sched/core.c:-1
CPU: 1 PID: 6586 Comm: syz.3.572 Not tainted 6.6.102-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
<TASK>
dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
panic+0x2c0/0x710 kernel/panic.c:340
__stack_chk_fail+0x25/0x30 kernel/panic.c:771
__schedule+0x1808/0x44d0 kernel/sched/core.c:-1
preempt_schedule_irq+0xb5/0x140 kernel/sched/core.c:7009
irqentry_exit+0x67/0x70 kernel/entry/common.c:438
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:692
RIP: 0010:filemap_read_folio+0x1c5/0x760 mm/filemap.c:2434
Code: 00 00 00 65 48 8b 04 25 28 00 00 00 48 3b 84 24 80 00 00 00 0f 85 c3 01 00 00 44 89 e0 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f <5d> c3 48 b8 00 00 00 00 00 fc ff df 41 80 3c 06 00 74 08 4c 89 ff
RSP: 0000:ffffc90004e07908 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000100cca RCX: 1ffff920009c0f10
RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000000
RBP: ffffc90004e07908 R08: ffffea0001622087 R09: 1ffffd40002c4410
R10: dffffc0000000000 R11: fffff940002c4411 R12: ffff88806be7a958
R13: ffff88806be7a958 R14: 0000000000000000 R15: dffffc0000000000
do_read_cache_folio+0x470/0x7e0 mm/filemap.c:3789
do_read_cache_page+0x32/0x250 mm/filemap.c:3855
read_mapping_page include/linux/pagemap.h:892 [inline]
ntfs_map_page+0x1d/0x60 fs/ntfs/aops.h:75
ntfs_fill_super+0x3415/0x42e0 fs/ntfs3/super.c:1434
get_tree_bdev+0x3e4/0x510 fs/super.c:1591
vfs_get_tree+0x8c/0x280 fs/super.c:1764
do_new_mount+0x24b/0xa40 fs/namespace.c:3371
do_mount fs/namespace.c:3711 [inline]
__do_sys_mount fs/namespace.c:3920 [inline]
__se_sys_mount+0x2da/0x3c0 fs/namespace.c:3897
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fae95f9038a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff9abb5fb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fff9abb6040 RCX: 00007fae95f9038a
RDX: 00002000000002c0 RSI: 0000200000000040 RDI: 00007fff9abb6000
RBP: 00002000000002c0 R08: 00007fff9abb6040 R09: 0000000000000082
R10: 0000000000000082 R11: 0000000000000246 R12: 0000200000000040
R13: 00007fff9abb6000 R14: 000000000001f84f R15: 00002000000000c0
</TASK>
Kernel Offset: disabled
Rebooting in 86400 seconds..
----------------
Code disassembly (best guess):
0: 00 00 add %al,(%rax)
2: 00 65 48 add %ah,0x48(%rbp)
5: 8b 04 25 28 00 00 00 mov 0x28,%eax
c: 48 3b 84 24 80 00 00 cmp 0x80(%rsp),%rax
13: 00
14: 0f 85 c3 01 00 00 jne 0x1dd
1a: 44 89 e0 mov %r12d,%eax
1d: 48 8d 65 d8 lea -0x28(%rbp),%rsp
21: 5b pop %rbx
22: 41 5c pop %r12
24: 41 5d pop %r13
26: 41 5e pop %r14
28: 41 5f pop %r15
* 2a: 5d pop %rbp <-- trapping instruction
2b: c3 ret
2c: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
33: fc ff df
36: 41 80 3c 06 00 cmpb $0x0,(%r14,%rax,1)
3b: 74 08 je 0x45
3d: 4c 89 ff mov %r15,%rdi


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
Oct 2, 2025, 6:44:07 AM10/2/25
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit c5aa6ba1127307ab5dc3773eaf40d73a3423841f
Author: Ye Bin <yeb...@huawei.com>
Date: Mon Aug 11 14:18:30 2025 +0000

fs/buffer: fix use-after-free when call bh_read() helper

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14d88458580000
start commit: bb9c90ab9c5a Linux 6.6.102
git tree: linux-6.6.y
If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: fs/buffer: fix use-after-free when call bh_read() helper

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages