syzbot
BUG: unable to handle kernel paging request in preempt_schedule_irq
Status:
fixed on 2025/09/09 18:24
Reported-by: syzbot+1d1faa577d3dc8018a10@syzkaller.appspotmail.com
Fix commit:
7375f22495e7
fs/buffer: fix use-after-free when call bh_read() helper
First crash: 419d, last: 380d
▶
▼
Bug presence (1)
| Date |
Name |
Commit |
Repro |
Result |
| 2025/08/31 |
upstream (ToT) |
c8bc81a52d5a |
syz
|
Didn't crash |
▶
▼
Fix bisection attempts (2)
Sample crash report:
BUG: unable to handle page fault for address: ffffed110531bfff
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 23ffee067 P4D 23ffee067 PUD 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 4878 Comm: syz.1.117 Not tainted 6.1.142-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:constant_test_bit arch/x86/include/asm/bitops.h:207 [inline]
RIP: 0010:arch_test_bit arch/x86/include/asm/bitops.h:239 [inline]
RIP: 0010:_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline]
RIP: 0010:test_ti_thread_flag include/linux/thread_info.h:118 [inline]
RIP: 0010:need_resched include/linux/sched.h:2230 [inline]
RIP: 0010:preempt_schedule_irq+0xf6/0x150 kernel/sched/core.c:6876
Code: 90 d0 6e f7 bf 01 00 00 00 e8 96 48 3f f7 65 48 8b 1d 5e 09 ea 75 48 89 df be 08 00 00 00 e8 d1 ee b9 f7 48 89 d8 48 c1 e8 03 <42> 80 3c 30 00 74 91 48 89 df e8 2b ed b9 f7 eb 87 48 c7 04 24 0e
RSP: 0018:ffffc90005f86660 EFLAGS: 00010806
RAX: 1ffff1100531c000 RBX: ffff8880298e0000 RCX: ffffffff8a1865ef
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff8880298e0000
RBP: ffffc90005f86700 R08: dffffc0000000000 R09: ffffed100531c001
R10: ffffed100531c001 R11: 1ffff1100531c000 R12: 0000000000000000
R13: 0000000000000000 R14: dffffc00ffffffff R15: 1ffff92000bf0ccc
FS: 00007fcd070196c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed110531bfff CR3: 000000007f43f000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
irqentry_exit+0x63/0x70 kernel/entry/common.c:439
asm_sysvec_reschedule_ipi+0x16/0x20 arch/x86/include/asm/idtentry.h:696
RIP: 0010:is_rwsem_reader_owned kernel/locking/rwsem.c:195 [inline]
RIP: 0010:__up_read+0x125/0x660 kernel/locking/rwsem.c:1345
Code: 00 e8 df fd 6f 00 49 89 dd 49 c1 ed 03 48 b8 00 00 00 00 00 fc ff df 41 80 7c 05 00 00 74 08 48 89 df e8 2e fc 6f 00 48 8b 03 <a8> 01 75 37 4c 8d 7b 08 4c 89 ff be 08 00 00 00 e8 a6 fd 6f 00 4c
RSP: 0018:ffffc90005f867c0 EFLAGS: 00000246
RAX: 0000000000000100 RBX: ffff88805b61dd50 RCX: ffffffff816256e1
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88805b61dd50
RBP: ffffc90005f86868 R08: dffffc0000000000 R09: ffffed100b6c3bab
R10: ffffed100b6c3bab R11: 1ffff1100b6c3baa R12: ffff88805b61ddb8
R13: 1ffff1100b6c3baa R14: 1ffff1100b6c3bb7 R15: ffffc90005f86b08
filemap_invalidate_unlock_shared include/linux/fs.h:825 [inline]
page_cache_ra_unbounded+0x69a/0x770 mm/readahead.c:271
page_cache_sync_readahead include/linux/pagemap.h:1248 [inline]
filemap_get_pages mm/filemap.c:2665 [inline]
filemap_read+0x5ff/0x2f80 mm/filemap.c:2759
generic_file_read_iter+0x115/0x670 mm/filemap.c:2914
__kernel_read+0x2dc/0x6b0 fs/read_write.c:428
integrity_kernel_read+0x86/0xd0 security/integrity/iint.c:228
ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline]
ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline]
ima_calc_file_hash+0x96b/0x17c0 security/integrity/ima/ima_crypto.c:573
ima_collect_measurement+0x4b3/0xac0 security/integrity/ima/ima_api.c:293
process_measurement+0xfae/0x1a10 security/integrity/ima/ima_main.c:351
ima_file_check+0xc2/0x100 security/integrity/ima/ima_main.c:534
do_open fs/namei.c:3628 [inline]
path_openat+0x2679/0x2e70 fs/namei.c:3783
do_filp_open+0x1c1/0x3c0 fs/namei.c:3810
do_sys_openat2+0x142/0x490 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__x64_sys_openat+0x135/0x160 fs/open.c:1345
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fcd0618e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fcd07019038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fcd063b6080 RCX: 00007fcd0618e929
RDX: 0000000000143042 RSI: 00002000000000c0 RDI: ffffffffffffff9c
RBP: 00007fcd06210b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fcd063b6080 R15: 00007ffccf538598
</TASK>
Modules linked in:
CR2: ffffed110531bfff
---[ end trace 0000000000000000 ]---
RIP: 0010:constant_test_bit arch/x86/include/asm/bitops.h:207 [inline]
RIP: 0010:arch_test_bit arch/x86/include/asm/bitops.h:239 [inline]
RIP: 0010:_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline]
RIP: 0010:test_ti_thread_flag include/linux/thread_info.h:118 [inline]
RIP: 0010:need_resched include/linux/sched.h:2230 [inline]
RIP: 0010:preempt_schedule_irq+0xf6/0x150 kernel/sched/core.c:6876
Code: 90 d0 6e f7 bf 01 00 00 00 e8 96 48 3f f7 65 48 8b 1d 5e 09 ea 75 48 89 df be 08 00 00 00 e8 d1 ee b9 f7 48 89 d8 48 c1 e8 03 <42> 80 3c 30 00 74 91 48 89 df e8 2b ed b9 f7 eb 87 48 c7 04 24 0e
RSP: 0018:ffffc90005f86660 EFLAGS: 00010806
RAX: 1ffff1100531c000 RBX: ffff8880298e0000 RCX: ffffffff8a1865ef
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff8880298e0000
RBP: ffffc90005f86700 R08: dffffc0000000000 R09: ffffed100531c001
R10: ffffed100531c001 R11: 1ffff1100531c000 R12: 0000000000000000
R13: 0000000000000000 R14: dffffc00ffffffff R15: 1ffff92000bf0ccc
FS: 00007fcd070196c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed110531bfff CR3: 000000007f43f000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 90 nop
1: d0 6e f7 shrb -0x9(%rsi)
4: bf 01 00 00 00 mov $0x1,%edi
9: e8 96 48 3f f7 call 0xf73f48a4
e: 65 48 8b 1d 5e 09 ea mov %gs:0x75ea095e(%rip),%rbx # 0x75ea0974
15: 75
16: 48 89 df mov %rbx,%rdi
19: be 08 00 00 00 mov $0x8,%esi
1e: e8 d1 ee b9 f7 call 0xf7b9eef4
23: 48 89 d8 mov %rbx,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 80 3c 30 00 cmpb $0x0,(%rax,%r14,1) <-- trapping instruction
2f: 74 91 je 0xffffffc2
31: 48 89 df mov %rbx,%rdi
34: e8 2b ed b9 f7 call 0xf7b9ed64
39: eb 87 jmp 0xffffffc2
3b: 48 rex.W
3c: c7 .byte 0xc7
3d: 04 24 add $0x24,%al
3f: 0e (bad)
* Struck through repros no longer work on HEAD.