[v6.1] kernel BUG in filemap_unaccount_folio

2 views
Skip to first unread message

syzbot

unread,
Dec 13, 2023, 3:56:29 AM12/13/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e7cddbb41b63 Linux 6.1.67
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16a98beae80000
kernel config: https://syzkaller.appspot.com/x/.config?x=4d75c4ebe0b479d3
dashboard link: https://syzkaller.appspot.com/bug?extid=3d218f7b6c5511a83a79
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16ab887ce80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17bce596e80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e225d33f0758/disk-e7cddbb4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1f23e16b249c/vmlinux-e7cddbb4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0947ed4da17a/Image-e7cddbb4.gz.xz

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

raw: 05ffd00000080017 fffffc0003815dc8 fffffc0003827e08 ffff0000d96a7508
raw: 0000000000000000 0000000000000000 0000000400000000 ffff0000c0938000
page dumped because: VM_BUG_ON_FOLIO(folio_mapped(folio))
------------[ cut here ]------------
kernel BUG at mm/filemap.c:153!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 4221 Comm: syz-executor168 Not tainted 6.1.67-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : filemap_unaccount_folio+0x464/0x50c mm/filemap.c:153
lr : filemap_unaccount_folio+0x464/0x50c mm/filemap.c:153
sp : ffff80001dc770c0
x29: ffff80001dc770d0 x28: ffff80001dc77408 x27: 0000000000000000
x26: 0000000000000000 x25: dfff800000000000 x24: 1fffe0001b2d4ea1
x23: ffff0000d96a7508 x22: ffff80001dc771a0 x21: ffff700003b8ee30
x20: ffff0000d96a7508 x19: fffffc0003815e00 x18: ffff80001dc76580
x17: 0000000000000000 x16: ffff800012141a14 x15: 0000000000000000
x14: 00000000ffffffff x13: 0000000000000001 x12: 0000000000000001
x11: 0000000000ff0100 x10: 0000000000000000 x9 : ffff800008835d38
x8 : ffff0000d63b1bc0 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001dc76938 x4 : ffff800015902aa0 x3 : ffff800008589028
x2 : 0000000000000001 x1 : 0000000100000002 x0 : 0000000000000039
Call trace:
filemap_unaccount_folio+0x464/0x50c mm/filemap.c:153
__filemap_remove_folio+0xc4/0x604 mm/filemap.c:222
filemap_remove_folio+0xd4/0x1cc mm/filemap.c:255
truncate_inode_folio+0x6c/0x84 mm/truncate.c:196
shmem_undo_range+0x434/0x15d4 mm/shmem.c:942
shmem_truncate_range mm/shmem.c:1045 [inline]
shmem_evict_inode+0x200/0x8a8 mm/shmem.c:1154
evict+0x260/0x68c fs/inode.c:664
iput_final fs/inode.c:1789 [inline]
iput+0x7c0/0x8a4 fs/inode.c:1815
dentry_unlink_inode+0x370/0x4b0 fs/dcache.c:401
__dentry_kill+0x324/0x5e4 fs/dcache.c:607
dentry_kill+0xc8/0x250
dput+0x218/0x454 fs/dcache.c:913
__fput+0x4f4/0x7bc fs/file_table.c:328
____fput+0x20/0x30 fs/file_table.c:348
task_work_run+0x240/0x2f0 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
do_notify_resume+0x2148/0x3474 arch/arm64/kernel/signal.c:1132
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
el0_svc+0x9c/0x168 arch/arm64/kernel/entry-common.c:638
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Code: b004de81 91018021 aa1303e0 9403c117 (d4210000)
---[ end trace 0000000000000000 ]---


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

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
Reply all
Reply to author
Forward
0 new messages