[v5.15] KASAN: use-after-free Write in udf_close_lvid

1 view
Skip to first unread message

syzbot

unread,
May 23, 2023, 12:31:57 PM5/23/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9d6bde853685 Linux 5.15.112
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=126d9a89280000
kernel config: https://syzkaller.appspot.com/x/.config?x=a61e8195d8bdf36e
dashboard link: https://syzkaller.appspot.com/bug?extid=61564e5023b7229ec85d
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=1523c361280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1634d42e280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b65d6c2ec328/disk-9d6bde85.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/cf811ebac37b/vmlinux-9d6bde85.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b2f32fdecf97/bzImage-9d6bde85.xz
mounted in repro #1: https://storage.googleapis.com/syzbot-assets/3e49a4b43735/mount_0.gz
mounted in repro #2: https://storage.googleapis.com/syzbot-assets/25c4999c7223/mount_4.gz

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

==================================================================
BUG: KASAN: use-after-free in udf_close_lvid+0x6a4/0x9a0 fs/udf/super.c:2076
Write of size 1 at addr ffff8880b559b068 by task syz-executor817/3534

CPU: 0 PID: 3534 Comm: syz-executor817 Not tainted 5.15.112-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/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+0x63/0x3b0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
udf_close_lvid+0x6a4/0x9a0 fs/udf/super.c:2076
udf_put_super+0xc9/0x160 fs/udf/super.c:2363
generic_shutdown_super+0x136/0x2c0 fs/super.c:475
kill_block_super+0x7a/0xe0 fs/super.c:1405
deactivate_locked_super+0xa0/0x110 fs/super.c:335
cleanup_mnt+0x44e/0x500 fs/namespace.c:1143
task_work_run+0x129/0x1a0 kernel/task_work.c:164
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:175
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
__syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f2756b14007
Code: 08 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffcef8eb58 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f2756b14007
RDX: 00007fffcef8ec19 RSI: 000000000000000a RDI: 00007fffcef8ec10
RBP: 00007fffcef8ec10 R08: 00000000ffffffff R09: 00007fffcef8e9f0
R10: 000055555700e66b R11: 0000000000000202 R12: 00007fffcef8fc80
R13: 000055555700e5f0 R14: 00007fffcef8eb80 R15: 0000000000000003
</TASK>

The buggy address belongs to the page:
page:ffffea0002d566c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xb559b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0002d566c8 ffffea0002d566c8 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner info is not present (never set?)

Memory state around the buggy address:
ffff8880b559af00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880b559af80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880b559b000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8880b559b080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8880b559b100: 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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

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