Hello,
syzbot found the following issue on:
HEAD commit: a343b0dd87b4 Linux 6.1.30
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=146e47c1280000
kernel config:
https://syzkaller.appspot.com/x/.config?x=5265a3c898f3cbbb
dashboard link:
https://syzkaller.appspot.com/bug?extid=5cf976404e004598be30
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=14e73bb9280000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=161f54cd280000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/195d974b1f1c/disk-a343b0dd.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/ea41850547fb/vmlinux-a343b0dd.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/13ec9e70ad28/bzImage-a343b0dd.xz
mounted in repro #1:
https://storage.googleapis.com/syzbot-assets/b3c5520d093d/mount_0.gz
mounted in repro #2:
https://storage.googleapis.com/syzbot-assets/20f528931104/mount_3.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
[email protected]
UDF-fs: error (device loop0): udf_read_tagged: tag version 0x0000 != 0x0002 || 0x0003, block 0
UDF-fs: warning (device loop0): udf_load_vrs: No anchor found
UDF-fs: Scanning with blocksize 512 failed
UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/11/22 14:59 (1000)
==================================================================
BUG: KASAN: use-after-free in crc_itu_t+0x1d1/0x2a0 lib/crc-itu-t.c:60
Read of size 1 at addr ffff8880713dc000 by task syz-executor159/3543
CPU: 0 PID: 3543 Comm: syz-executor159 Not tainted 6.1.30-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
print_address_description mm/kasan/report.c:284 [inline]
print_report+0x15f/0x4f0 mm/kasan/report.c:395
kasan_report+0x136/0x160 mm/kasan/report.c:495
crc_itu_t+0x1d1/0x2a0 lib/crc-itu-t.c:60
udf_finalize_lvid fs/udf/super.c:2022 [inline]
udf_sync_fs+0x1ce/0x380 fs/udf/super.c:2378
sync_filesystem+0xe8/0x220 fs/sync.c:56
generic_shutdown_super+0x6b/0x340 fs/super.c:474
kill_block_super+0x7a/0xe0 fs/super.c:1450
deactivate_locked_super+0xa0/0x110 fs/super.c:332
cleanup_mnt+0x490/0x520 fs/namespace.c:1186
task_work_run+0x246/0x300 kernel/task_work.c:179
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0x6fb/0x2300 kernel/exit.c:869
do_group_exit+0x202/0x2b0 kernel/exit.c:1019
__do_sys_exit_group kernel/exit.c:1030 [inline]
__se_sys_exit_group kernel/exit.c:1028 [inline]
__x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1028
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f32f6dca4e9
Code: Unable to access opcode bytes at 0x7f32f6dca4bf.
RSP: 002b:00007ffd883df788 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f32f6e69450 RCX: 00007f32f6dca4e9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 0000000000000001 R08: ffffffffffffffb8 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f32f6e69450
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
</TASK>
The buggy address belongs to the physical page:
page:ffffea0001c4f700 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x713dc
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0001c09f48 ffffea0001c4eb08 0000000000000000
raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Movable, gfp_mask 0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO), pid 3542, tgid 3542 (sh), ts 64109654106, free_ts 64434310084
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2533
prep_new_page mm/page_alloc.c:2540 [inline]
get_page_from_freelist+0x32ed/0x3480 mm/page_alloc.c:4292
__alloc_pages+0x28d/0x770 mm/page_alloc.c:5559
__folio_alloc+0xf/0x30 mm/page_alloc.c:5591
vma_alloc_folio+0x486/0x990 mm/mempolicy.c:2241
alloc_page_vma include/linux/gfp.h:284 [inline]
do_anonymous_page mm/memory.c:4123 [inline]
handle_pte_fault mm/memory.c:4962 [inline]
__handle_mm_fault mm/memory.c:5106 [inline]
handle_mm_fault+0x2e85/0x5330 mm/memory.c:5227
faultin_page mm/gup.c:1009 [inline]
__get_user_pages+0x4f3/0x1190 mm/gup.c:1233
__get_user_pages_locked mm/gup.c:1437 [inline]
__get_user_pages_remote+0x1cd/0x750 mm/gup.c:2190
get_arg_page+0x147/0x370 fs/exec.c:220
copy_string_kernel+0x144/0x1e0 fs/exec.c:637
do_execveat_common+0x3ba/0x720 fs/exec.c:1916
do_execve fs/exec.c:2016 [inline]
__do_sys_execve fs/exec.c:2092 [inline]
__se_sys_execve fs/exec.c:2087 [inline]
__x64_sys_execve+0x8e/0xa0 fs/exec.c:2087
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1460 [inline]
free_pcp_prepare mm/page_alloc.c:1510 [inline]
free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3388
free_unref_page_list+0x107/0x810 mm/page_alloc.c:3530
release_pages+0x2836/0x2b40 mm/swap.c:1055
tlb_batch_pages_flush mm/mmu_gather.c:59 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:254 [inline]
tlb_flush_mmu+0xfc/0x210 mm/mmu_gather.c:261
tlb_finish_mmu+0xce/0x1f0 mm/mmu_gather.c:361
exit_mmap+0x3c3/0x9f0 mm/mmap.c:3139
__mmput+0x115/0x3c0 kernel/fork.c:1191
exit_mm+0x226/0x300 kernel/exit.c:563
do_exit+0x67e/0x2300 kernel/exit.c:856
do_group_exit+0x202/0x2b0 kernel/exit.c:1019
__do_sys_exit_group kernel/exit.c:1030 [inline]
__se_sys_exit_group kernel/exit.c:1028 [inline]
__x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1028
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Memory state around the buggy address:
ffff8880713dbf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880713dbf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880713dc000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880713dc080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880713dc100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
---
If the bug is already fixed, 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 change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup