Hello,
syzbot found the following issue on:
HEAD commit: 6741e066ec76 Linux 6.1.87
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=14c526a0980000
kernel config:
https://syzkaller.appspot.com/x/.config?x=5d37120947ebed5a
dashboard link:
https://syzkaller.appspot.com/bug?extid=30c4e2d7a249cce8b266
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/e09aa9dab3c8/disk-6741e066.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/4176a4f5a4d5/vmlinux-6741e066.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/970367753980/Image-6741e066.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+30c4e2...@syzkaller.appspotmail.com
------------[ cut here ]------------
virt_to_phys used for non-linear address: 00000000424a10f0 (0xffff80002bdca000)
WARNING: CPU: 1 PID: 4243 at arch/arm64/mm/physaddr.c:15 __virt_to_phys+0x84/0x9c arch/arm64/mm/physaddr.c:17
Modules linked in:
CPU: 1 PID: 4243 Comm: syz-executor.4 Not tainted 6.1.87-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
pstate: 60401005 (nZCv daif +PAN -UAO -TCO -DIT +SSBS BTYPE=--)
pc : __virt_to_phys+0x84/0x9c arch/arm64/mm/physaddr.c:17
lr : __virt_to_phys+0x80/0x9c arch/arm64/mm/physaddr.c:12
sp : ffff80001ddc7800
x29: ffff80001ddc7800 x28: 1ffff00002b09aa9 x27: dfff800000000000
x26: 0000000000000002 x25: 1fffe0001da100cf x24: dfff800000000000
x23: dfff800000000000 x22: ffff0000d41cff00 x21: 0000000000040000
x20: 000080002bdca000 x19: ffff80002bdca000 x18: ffff80001ddc6c00
x17: 6666783028203066 x16: ffff80001215c9dc x15: 0000000000000000
x14: 00000000ffffffff x13: 0000000000000001 x12: 0000000000000001
x11: 0000000000ff0100 x10: 0000000000000000 x9 : 5956bfa019ab1700
x8 : ffff800015262000 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001ddc70f8 x4 : ffff800015932b00 x3 : ffff80000858856c
x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000000
Call trace:
__virt_to_phys+0x84/0x9c arch/arm64/mm/physaddr.c:17
virt_to_folio include/linux/mm.h:898 [inline]
kfree+0x90/0x1b8 mm/slab_common.c:999
put_ntfs+0x80/0x240 fs/ntfs3/super.c:444
ntfs_put_super+0xbc/0x10c fs/ntfs3/super.c:486
generic_shutdown_super+0x130/0x328 fs/super.c:501
kill_block_super+0x70/0xdc fs/super.c:1459
deactivate_locked_super+0xac/0x124 fs/super.c:332
deactivate_super+0xf0/0x110 fs/super.c:363
cleanup_mnt+0x394/0x41c fs/namespace.c:1186
__cleanup_mnt+0x20/0x30 fs/namespace.c:1193
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
irq event stamp: 361368
hardirqs last enabled at (361367): [<ffff800008343d08>] __up_console_sem+0xb4/0x100 kernel/printk/printk.c:261
hardirqs last disabled at (361368): [<ffff800012158694>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405
softirqs last enabled at (361238): [<ffff800008020d7c>] softirq_handle_end kernel/softirq.c:414 [inline]
softirqs last enabled at (361238): [<ffff800008020d7c>] __do_softirq+0xc1c/0xe38 kernel/softirq.c:600
softirqs last disabled at (361093): [<ffff80000802a99c>] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 1 PID: 4243 at mm/slab_common.c:923 free_large_kmalloc+0x34/0x15c mm/slab_common.c:924
Modules linked in:
CPU: 1 PID: 4243 Comm: syz-executor.4 Tainted: G W 6.1.87-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
pstate: 60401005 (nZCv daif +PAN -UAO -TCO -DIT +SSBS BTYPE=--)
pc : free_large_kmalloc+0x34/0x15c mm/slab_common.c:924
lr : kfree+0x10c/0x1b8 mm/slab_common.c:1001
sp : ffff80001ddc77f0
x29: ffff80001ddc77f0 x28: 1ffff00002b09aa9 x27: dfff800000000000
x26: 0000000000000002 x25: 1fffe0001da100cf x24: dfff800000000000
x23: dfff800000000000 x22: ffff0000d41cff00 x21: ffff800008812394
x20: ffff80002bdca000 x19: fffffc000620f280 x18: ffff80001ddc6c00
x17: 6666783028203066 x16: ffff80001215c9dc x15: 0000000000000000
x14: 00000000ffffffff x13: 0000000000000001 x12: 0000000000000001
x11: 0000000000ff0100 x10: 0000000000000000 x9 : 000000000620f280
x8 : ffff800018178000 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001ddc70f8 x4 : ffff800015932b00 x3 : ffff80000858856c
x2 : 0000000000000001 x1 : ffff80002bdca000 x0 : fffffc000620f280
Call trace:
free_large_kmalloc+0x34/0x15c mm/slab_common.c:924
kfree+0x10c/0x1b8 mm/slab_common.c:1001
put_ntfs+0x80/0x240 fs/ntfs3/super.c:444
ntfs_put_super+0xbc/0x10c fs/ntfs3/super.c:486
generic_shutdown_super+0x130/0x328 fs/super.c:501
kill_block_super+0x70/0xdc fs/super.c:1459
deactivate_locked_super+0xac/0x124 fs/super.c:332
deactivate_super+0xf0/0x110 fs/super.c:363
cleanup_mnt+0x394/0x41c fs/namespace.c:1186
__cleanup_mnt+0x20/0x30 fs/namespace.c:1193
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
irq event stamp: 361716
hardirqs last enabled at (361715): [<ffff80001215aaa8>] __exit_to_kernel_mode arch/arm64/kernel/entry-common.c:84 [inline]
hardirqs last enabled at (361715): [<ffff80001215aaa8>] exit_to_kernel_mode+0xe8/0x118 arch/arm64/kernel/entry-common.c:94
hardirqs last disabled at (361716): [<ffff800012158694>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405
softirqs last enabled at (361710): [<ffff800008020d7c>] softirq_handle_end kernel/softirq.c:414 [inline]
softirqs last enabled at (361710): [<ffff800008020d7c>] __do_softirq+0xc1c/0xe38 kernel/softirq.c:600
softirqs last disabled at (361371): [<ffff80000802a99c>] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80
---[ end trace 0000000000000000 ]---
object pointer: 0x00000000424a10f0
------------[ cut here ]------------
virt_to_phys used for non-linear address: 00000000424a10f0 (0xffff80002bdca000)
WARNING: CPU: 1 PID: 4243 at arch/arm64/mm/physaddr.c:15 __virt_to_phys+0x84/0x9c arch/arm64/mm/physaddr.c:17
Modules linked in:
CPU: 1 PID: 4243 Comm: syz-executor.4 Tainted: G W 6.1.87-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
pstate: 60401005 (nZCv daif +PAN -UAO -TCO -DIT +SSBS BTYPE=--)
pc : __virt_to_phys+0x84/0x9c arch/arm64/mm/physaddr.c:17
lr : __virt_to_phys+0x80/0x9c arch/arm64/mm/physaddr.c:12
sp : ffff80001ddc7790
x29: ffff80001ddc7790 x28: 1ffff00002b09aa9 x27: dfff800000000000
x26: 0000000000000002 x25: 1fffe0001da100cf x24: dfff800000000000
x23: 0000000000040000 x22: ffff800015262000 x21: fffffc0000000000
x20: 000080002bdca000 x19: ffff80002bdca000 x18: 1fffe0003686f176
x17: ffff80001584d000 x16: ffff800008305ec4 x15: ffff0001b4378bbc
x14: 1ffff00002b0a0b0 x13: dfff800000000000 x12: 0000000000000003
x11: 0000000000ff0100 x10: 0000000000000003 x9 : 5956bfa019ab1700
x8 : ffff800015262000 x7 : ffff80000827c8d4 x6 : 0000000000000000
x5 : 0000000000000080 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000006 x1 : ffff8000122bc6e0 x0 : ffff80019ebd6000
Call trace:
__virt_to_phys+0x84/0x9c arch/arm64/mm/physaddr.c:17
virt_to_head_page include/linux/mm.h:891 [inline]
____kasan_kfree_large mm/kasan/common.c:252 [inline]
__kasan_kfree_large+0x34/0xc0 mm/kasan/common.c:272
kasan_kfree_large include/linux/kasan.h:185 [inline]
free_large_kmalloc+0x70/0x15c mm/slab_common.c:927
kfree+0x10c/0x1b8 mm/slab_common.c:1001
put_ntfs+0x80/0x240 fs/ntfs3/super.c:444
ntfs_put_super+0xbc/0x10c fs/ntfs3/super.c:486
generic_shutdown_super+0x130/0x328 fs/super.c:501
kill_block_super+0x70/0xdc fs/super.c:1459
deactivate_locked_super+0xac/0x124 fs/super.c:332
deactivate_super+0xf0/0x110 fs/super.c:363
cleanup_mnt+0x394/0x41c fs/namespace.c:1186
__cleanup_mnt+0x20/0x30 fs/namespace.c:1193
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
irq event stamp: 361958
hardirqs last enabled at (361957): [<ffff80000827c974>] raw_spin_rq_unlock_irq kernel/sched/sched.h:1366 [inline]
hardirqs last enabled at (361957): [<ffff80000827c974>] finish_lock_switch+0xbc/0x1e8 kernel/sched/core.c:5004
hardirqs last disabled at (361958): [<ffff800012158694>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405
softirqs last enabled at (361950): [<ffff800008020d7c>] softirq_handle_end kernel/softirq.c:414 [inline]
softirqs last enabled at (361950): [<ffff800008020d7c>] __do_softirq+0xc1c/0xe38 kernel/softirq.c:600
softirqs last disabled at (361935): [<ffff80000802a99c>] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80
---[ end trace 0000000000000000 ]---
==================================================================
BUG: KASAN: invalid-free in kfree+0x10c/0x1b8 mm/slab_common.c:1001
Free of addr ffff80002bdca000 by task syz-executor.4/4243
CPU: 1 PID: 4243 Comm: syz-executor.4 Tainted: G W 6.1.87-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:284 [inline]
print_report+0x174/0x4c0 mm/kasan/report.c:395
kasan_report_invalid_free+0xc4/0x114 mm/kasan/report.c:460
__kasan_kfree_large+0xa4/0xc0 mm/kasan/common.c:272
kasan_kfree_large include/linux/kasan.h:185 [inline]
free_large_kmalloc+0x70/0x15c mm/slab_common.c:927
kfree+0x10c/0x1b8 mm/slab_common.c:1001
put_ntfs+0x80/0x240 fs/ntfs3/super.c:444
ntfs_put_super+0xbc/0x10c fs/ntfs3/super.c:486
generic_shutdown_super+0x130/0x328 fs/super.c:501
kill_block_super+0x70/0xdc fs/super.c:1459
deactivate_locked_super+0xac/0x124 fs/super.c:332
deactivate_super+0xf0/0x110 fs/super.c:363
cleanup_mnt+0x394/0x41c fs/namespace.c:1186
__cleanup_mnt+0x20/0x30 fs/namespace.c:1193
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
The buggy address belongs to the virtual mapping at
[ffff80002bdca000, ffff80002c5cb000) created by:
kvmalloc include/linux/slab.h:709 [inline]
ntfs_fill_super+0x2870/0x3458 fs/ntfs3/super.c:1144
The buggy address belongs to the physical page:
page:000000002bf8c297 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x125eb4
flags: 0x5ffe00000000000(node=0|zone=2|lastcpupid=0xfff)
raw: 05ffe00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff80002bdc9f00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
ffff80002bdc9f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
>ffff80002bdca000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
ffff80002bdca080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff80002bdca100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
BUG: Bad page state in process syz-executor.4 pfn:1c83ca
page:00000000119712ff refcount:0 mapcount:1 mapping:0000000000000000 index:0x4000150 pfn:0x1c83ca
memcg:ffff0000c0940000
flags: 0x5fff000000a0014(uptodate|lru|mappedtodisk|swapbacked|node=0|zone=2|lastcpupid=0xfff)
raw: 05fff000000a0014 fffffc000620e9c8 fffffc000620f2c8 0000000000000000
raw: 0000000004000150 0000000000000000 0000000000000000 ffff0000c0940000
page dumped because: page still charged to cgroup
Modules linked in:
CPU: 1 PID: 4243 Comm: syz-executor.4 Tainted: G B W 6.1.87-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x5c lib/dump_stack.c:113
bad_page+0x1a4/0x1c4 mm/page_alloc.c:699
free_page_is_bad_report mm/page_alloc.c:1277 [inline]
free_page_is_bad mm/page_alloc.c:1287 [inline]
free_pages_prepare mm/page_alloc.c:1433 [inline]
free_pcp_prepare mm/page_alloc.c:1490 [inline]
free_unref_page_prepare+0x348/0x1070 mm/page_alloc.c:3358
free_unref_page+0x80/0x420 mm/page_alloc.c:3453
free_the_page mm/page_alloc.c:750 [inline]
__free_pages+0x1a0/0x1cc mm/page_alloc.c:5636
free_large_kmalloc+0xd0/0x15c mm/slab_common.c:932
kfree+0x10c/0x1b8 mm/slab_common.c:1001
put_ntfs+0x80/0x240 fs/ntfs3/super.c:444
ntfs_put_super+0xbc/0x10c fs/ntfs3/super.c:486
generic_shutdown_super+0x130/0x328 fs/super.c:501
kill_block_super+0x70/0xdc fs/super.c:1459
deactivate_locked_super+0xac/0x124 fs/super.c:332
deactivate_super+0xf0/0x110 fs/super.c:363
cleanup_mnt+0x394/0x41c fs/namespace.c:1186
__cleanup_mnt+0x20/0x30 fs/namespace.c:1193
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
---
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