[fs?] [mm?] WARNING: nested lock was not taken in filemap_get_read_batch

4 views
Skip to first unread message

syzbot

unread,
Mar 29, 2023, 10:23:40 AM3/29/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 65aca32efdcb Merge tag 'mm-hotfixes-stable-2023-03-24-17-0..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=138c6789c80000
kernel config: https://syzkaller.appspot.com/x/.config?x=acdb62bf488a8fe5
dashboard link: https://syzkaller.appspot.com/bug?extid=f272cbd4a127b5ad5b5c
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linux-...@vger.kernel.org linu...@kvack.org wi...@infradead.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0d9fbbbdd7df/disk-65aca32e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f5798844ceac/vmlinux-65aca32e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c84901ea5532/bzImage-65aca32e.xz

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

==================================
WARNING: Nested lock was not taken
6.3.0-rc3-syzkaller-00317-g65aca32efdcb #0 Not tainted
----------------------------------
syz-executor.5/27215 is trying to lock:
ffffffff8cf25420 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x40 include/linux/rcupdate.h:326

but this task is not holding:
general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f]
CPU: 0 PID: 27215 Comm: syz-executor.5 Not tainted 6.3.0-rc3-syzkaller-00317-g65aca32efdcb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
RIP: 0010:print_lock_nested_lock_not_held kernel/locking/lockdep.c:4888 [inline]
RIP: 0010:__lock_acquire+0x10cd/0x1f80 kernel/locking/lockdep.c:5047
Code: 3c 30 00 48 8b 5c 24 78 74 12 48 89 df e8 5b f4 75 00 49 be 00 00 00 00 00 fc ff df 48 8b 1b 48 83 c3 18 48 89 d8 48 c1 e8 03 <42> 80 3c 30 00 74 08 48 89 df e8 34 f4 75 00 48 8b 33 48 c7 c7 60
RSP: 0018:ffffc900112c6500 EFLAGS: 00010006
RAX: 0000000000000003 RBX: 0000000000000018 RCX: 1e666058b2514200
RDX: ffffc90005834000 RSI: 000000000000f4c9 RDI: 000000000000f4ca
RBP: ffff888017cf8000 R08: ffffffff816dfe9c R09: ffffed101730515b
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888017cf8a30
R13: 0000000000000000 R14: dffffc0000000000 R15: ffff888017cf8808
FS: 00007f28a2f8e700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f28a2315889 CR3: 0000000027b98000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
lock_acquire+0x1e1/0x520 kernel/locking/lockdep.c:5669
rcu_lock_acquire+0x2e/0x40 include/linux/rcupdate.h:327
rcu_read_lock include/linux/rcupdate.h:773 [inline]
filemap_get_read_batch+0x174/0xc90 mm/filemap.c:2377
filemap_get_pages+0x4b9/0x20c0 mm/filemap.c:2600
filemap_read+0x45a/0x1170 mm/filemap.c:2693
__kernel_read+0x422/0x8a0 fs/read_write.c:428
integrity_kernel_read+0xb0/0xf0 security/integrity/iint.c:199
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+0xa5b/0x1c00 security/integrity/ima/ima_crypto.c:573
ima_collect_measurement+0x3a7/0x880 security/integrity/ima/ima_api.c:293
process_measurement+0xfdb/0x1ce0 security/integrity/ima/ima_main.c:341
ima_file_check+0xf1/0x170 security/integrity/ima/ima_main.c:539
do_open fs/namei.c:3562 [inline]
path_openat+0x280a/0x3170 fs/namei.c:3715
do_filp_open+0x234/0x490 fs/namei.c:3742
do_sys_openat2+0x13f/0x500 fs/open.c:1348
do_sys_open fs/open.c:1364 [inline]
__do_sys_open fs/open.c:1372 [inline]
__se_sys_open fs/open.c:1368 [inline]
__x64_sys_open+0x225/0x270 fs/open.c:1368
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f28a228c0f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f28a2f8e168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007f28a23ac050 RCX: 00007f28a228c0f9
RDX: 00000000000000f8 RSI: 0000000000000280 RDI: 0000000020000140
RBP: 00007f28a22e7b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd2394c9df R14: 00007f28a2f8e300 R15: 0000000000022000
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:print_lock_nested_lock_not_held kernel/locking/lockdep.c:4888 [inline]
RIP: 0010:__lock_acquire+0x10cd/0x1f80 kernel/locking/lockdep.c:5047
Code: 3c 30 00 48 8b 5c 24 78 74 12 48 89 df e8 5b f4 75 00 49 be 00 00 00 00 00 fc ff df 48 8b 1b 48 83 c3 18 48 89 d8 48 c1 e8 03 <42> 80 3c 30 00 74 08 48 89 df e8 34 f4 75 00 48 8b 33 48 c7 c7 60
RSP: 0018:ffffc900112c6500 EFLAGS: 00010006
RAX: 0000000000000003 RBX: 0000000000000018 RCX: 1e666058b2514200
RDX: ffffc90005834000 RSI: 000000000000f4c9 RDI: 000000000000f4ca
RBP: ffff888017cf8000 R08: ffffffff816dfe9c R09: ffffed101730515b
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888017cf8a30
R13: 0000000000000000 R14: dffffc0000000000 R15: ffff888017cf8808
FS: 00007f28a2f8e700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f28a2315889 CR3: 0000000027b98000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 3c 30 cmp $0x30,%al
2: 00 48 8b add %cl,-0x75(%rax)
5: 5c pop %rsp
6: 24 78 and $0x78,%al
8: 74 12 je 0x1c
a: 48 89 df mov %rbx,%rdi
d: e8 5b f4 75 00 callq 0x75f46d
12: 49 be 00 00 00 00 00 movabs $0xdffffc0000000000,%r14
19: fc ff df
1c: 48 8b 1b mov (%rbx),%rbx
1f: 48 83 c3 18 add $0x18,%rbx
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 08 je 0x39
31: 48 89 df mov %rbx,%rdi
34: e8 34 f4 75 00 callq 0x75f46d
39: 48 8b 33 mov (%rbx),%rsi
3c: 48 rex.W
3d: c7 .byte 0xc7
3e: c7 (bad)
3f: 60 (bad)


---
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.

syzbot

unread,
Jun 23, 2023, 10:18:51 AM6/23/23
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages