Hello,
syzbot found the following issue on:
HEAD commit: 70575e77839f Merge tag 'for_linus' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11a3bd70880000
kernel config: https://syzkaller.appspot.com/x/.config?x=ba0d23aa7e1ffaf5
dashboard link: https://syzkaller.appspot.com/bug?extid=d8fc21bfa138a5ae916d
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d99310e4b1b7/disk-70575e77.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ef3a5647354c/vmlinux-70575e77.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]
==================================================================
BUG: KASAN: use-after-free in crc_itu_t+0x1dd/0x2b0 lib/crc-itu-t.c:60
Read of size 1 at addr ffff888086d82000 by task syz-executor.3/3631
CPU: 1 PID: 3631 Comm: syz-executor.3 Not tainted 6.0.0-rc7-syzkaller-00180-g70575e77839f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106
print_address_description+0x65/0x4b0 mm/kasan/report.c:317
print_report+0x108/0x1f0 mm/kasan/report.c:433
kasan_report+0xc3/0xf0 mm/kasan/report.c:495
crc_itu_t+0x1dd/0x2b0 lib/crc-itu-t.c:60
udf_finalize_lvid fs/udf/super.c:2021 [inline]
udf_sync_fs+0x1bc/0x360 fs/udf/super.c:2377
sync_filesystem+0xe8/0x220 fs/sync.c:56
generic_shutdown_super+0x6b/0x300 fs/super.c:474
kill_block_super+0x79/0xd0 fs/super.c:1427
deactivate_locked_super+0xa7/0xf0 fs/super.c:332
cleanup_mnt+0x4ce/0x560 fs/namespace.c:1186
task_work_run+0x146/0x1c0 kernel/task_work.c:177
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0x124/0x150 kernel/entry/common.c:169
exit_to_user_mode_prepare+0xb2/0x140 kernel/entry/common.c:201
__syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
syscall_exit_to_user_mode+0x26/0x60 kernel/entry/common.c:294
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f27d8c8ba17
Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 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:00007ffdc87f33e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f27d8c8ba17
RDX: 00007ffdc87f34bb RSI: 000000000000000a RDI: 00007ffdc87f34b0
RBP: 00007ffdc87f34b0 R08: 00000000ffffffff R09: 00007ffdc87f3280
R10: 0000555555a338b3 R11: 0000000000000246 R12: 00007f27d8ce45f6
R13: 00007ffdc87f4570 R14: 0000555555a33810 R15: 00007ffdc87f45b0
</TASK>
The buggy address belongs to the physical page:
page:ffffea00021b6080 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x86d82
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea00021b60c8 ffffea00021cd108 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 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 5709, tgid 5709 (udevadm), ts 809679576496, free_ts 809958426983
prep_new_page mm/page_alloc.c:2532 [inline]
get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4283
__alloc_pages+0x259/0x560 mm/page_alloc.c:5549
__folio_alloc+0xf/0x30 mm/page_alloc.c:5580
vma_alloc_folio+0x662/0xb60 mm/mempolicy.c:2231
alloc_page_vma include/linux/gfp.h:290 [inline]
do_cow_fault+0xa6/0x5d0 mm/memory.c:4543
do_fault mm/memory.c:4655 [inline]
handle_pte_fault mm/memory.c:4917 [inline]
__handle_mm_fault mm/memory.c:5059 [inline]
handle_mm_fault+0x1b9d/0x3590 mm/memory.c:5157
do_user_addr_fault+0x69b/0xcb0 arch/x86/mm/fault.c:1397
handle_page_fault arch/x86/mm/fault.c:1488 [inline]
exc_page_fault+0x7a/0x110 arch/x86/mm/fault.c:1544
asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1449 [inline]
free_pcp_prepare+0x812/0x900 mm/page_alloc.c:1499
free_unref_page_prepare mm/page_alloc.c:3380 [inline]
free_unref_page_list+0xb4/0x7b0 mm/page_alloc.c:3522
release_pages+0x22c3/0x2540 mm/swap.c:1012
tlb_batch_pages_flush mm/mmu_gather.c:58 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:255 [inline]
tlb_flush_mmu+0x850/0xa70 mm/mmu_gather.c:262
tlb_finish_mmu+0xcb/0x200 mm/mmu_gather.c:353
exit_mmap+0x1cb/0x520 mm/mmap.c:3118
__mmput+0x111/0x3a0 kernel/fork.c:1187
exit_mm+0x1ef/0x2c0 kernel/exit.c:510
do_exit+0x4e1/0x20a0 kernel/exit.c:782
do_group_exit+0x23b/0x2f0 kernel/exit.c:925
__do_sys_exit_group kernel/exit.c:936 [inline]
__se_sys_exit_group kernel/exit.c:934 [inline]
__x64_sys_exit_group+0x3b/0x40 kernel/exit.c:934
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:
ffff888086d81f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888086d81f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888086d82000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888086d82080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888086d82100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
---
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 [email protected].
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot has found a reproducer for the following issue on:
HEAD commit: bbed346d5a96 Merge branch 'for-next/core' into for-kernelci
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output: https://syzkaller.appspot.com/x/log.txt?x=1160ec86880000
kernel config: https://syzkaller.appspot.com/x/.config?x=3a4a45d2d827c1e
dashboard link: https://syzkaller.appspot.com/bug?extid=d8fc21bfa138a5ae916d
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15b5373a880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11200026880000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e8e91bc79312/disk-bbed346d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c1cb3fb3b77e/vmlinux-bbed346d.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/f8dde53eb773/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]
netdevsim netdevsim0 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0
loop0: detected capacity change from 0 to 2048
Unable to handle kernel NULL pointer dereference at virtual address 000000000000001a
Mem abort info:
ESR = 0x0000000096000006
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x06: level 2 translation fault
Data abort info:
ISV = 0, ISS = 0x00000006
CM = 0, WnR = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=0000000107067000
[000000000000001a] pgd=080000010904b003, p4d=080000010904b003, pud=0800000109e4e003, pmd=0000000000000000
Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 3031 Comm: syz-executor632 Not tainted 6.0.0-rc7-syzkaller-18095-gbbed346d5a96 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : crc_itu_t+0x40/0x88 lib/crc-itu-t.c:60
lr : crc_itu_t+0x30/0x88 lib/crc-itu-t.c:59
sp : ffff800012a03a20
x29: ffff800012a03a20 x28: 0000000000000026 x27: 000000000000002c
x26: 00000000fffffff0 x25: 0000000000000000 x24: 00000000b147c223
x23: ffff0000c752c690 x22: ffff80000c170b50 x21: 000000000000ffd9
x20: 000000000000001a x19: 00000000b147c223 x18: 00000000000000c0
x17: ffff80000dd0b198 x16: ffff80000db49158 x15: ffff0000c5d8cf80
x14: 0000000000000010 x13: 0000000000000000 x12: ffff0000c5d8cf80
x11: ff808000095d5cec x10: 0000000000000000 x9 : ffff0000c5d8cf80
x8 : ffff8000095d5cec x7 : 0000000000000000 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000004 x3 : 0000000000000010
x2 : 000000000000ffda x1 : 000000000000ffda x0 : 0000000000000000
Call trace:
crc_itu_t+0x40/0x88
udf_write_fi+0x308/0x4e0
udf_delete_entry fs/udf/namei.c:577 [inline]
udf_rename+0x47c/0x6d0 fs/udf/namei.c:1173
vfs_rename+0x59c/0x7f8 fs/namei.c:4756
do_renameat2+0x490/0x758 fs/namei.c:4907
__do_sys_renameat2 fs/namei.c:4940 [inline]
__se_sys_renameat2 fs/namei.c:4937 [inline]
__arm64_sys_renameat2+0x6c/0x88 fs/namei.c:4937
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:636
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:654
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
Code: b40001f5 f0015cd6 d10006b5 912d42d6 (38401688)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: b40001f5 cbz x21, 0x3c
4: f0015cd6 adrp x22, 0x2b9b000
8: d10006b5 sub x21, x21, #0x1
c: 912d42d6 add x22, x22, #0xb50
* 10: 38401688 ldrb w8, [x20], #1 <-- trapping instruction
syzbot suspects this issue was fixed by commit:
commit 6f861765464f43a71462d52026fbddfc858239a5
Author: Jan Kara <[email protected]>
Date: Wed Nov 1 17:43:10 2023 +0000
fs: Block writes to mounted block devices
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1204f1efe80000
start commit: a4d7d7011219 Merge tag 'spi-fix-v6.4-rc5' of git://git.ker..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=7474de833c217bf4
dashboard link: https://syzkaller.appspot.com/bug?extid=d8fc21bfa138a5ae916d
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1442e70b280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16db80dd280000
If the result looks correct, please mark the issue as fixed by replying with:
#syz fix: fs: Block writes to mounted block devices
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
On Fri 26-01-24 05:12:04, syzbot wrote:
> syzbot suspects this issue was fixed by commit:
>
> commit 6f861765464f43a71462d52026fbddfc858239a5
> Author: Jan Kara <[email protected]>
> Date: Wed Nov 1 17:43:10 2023 +0000
>
> fs: Block writes to mounted block devices
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1204f1efe80000
> start commit: a4d7d7011219 Merge tag 'spi-fix-v6.4-rc5' of git://git.ker..
> git tree: upstream
> kernel config: https://syzkaller.appspot.com/x/.config?x=7474de833c217bf4
> dashboard link: https://syzkaller.appspot.com/bug?extid=d8fc21bfa138a5ae916d
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1442e70b280000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16db80dd280000
>
> If the result looks correct, please mark the issue as fixed by replying with:
Looks good:
#syz fix: fs: Block writes to mounted block devices
Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR