KASAN: out-of-bounds Write in udf_write_fi

11 views
Skip to first unread message

syzbot

unread,
Feb 5, 2022, 7:22:19 PM2/5/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=145dbe68700000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=016c71588b119564cde8
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

Unfortunately, I don't have any reproducer for this issue yet.

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

RDX: 0000000000000004 RSI: 0000000020000180 RDI: 0000000000000005
RBP: 00007f1ba69591d0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000200001c0 R11: 0000000000000246 R12: 0000000000000002
R13: 00007ffc9e2fe58f R14: 00007f1ba6959300 R15: 0000000000022000
==================================================================
BUG: KASAN: out-of-bounds in memset include/linux/string.h:362 [inline]
BUG: KASAN: out-of-bounds in udf_write_fi+0x8f9/0xf40 fs/udf/namei.c:93
Write of size 18446744073709551572 at addr ffff888089e1e62c by task syz-executor.5/26879

CPU: 1 PID: 26879 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
kasan_report+0x8f/0xa0 mm/kasan/report.c:412
memset+0x20/0x40 mm/kasan/kasan.c:285
memset include/linux/string.h:362 [inline]
udf_write_fi+0x8f9/0xf40 fs/udf/namei.c:93
udf_rename+0xdb4/0x1270 fs/udf/namei.c:1185
vfs_rename+0x67e/0x1bc0 fs/namei.c:4479
do_renameat2+0xb59/0xc70 fs/namei.c:4629
__do_sys_renameat fs/namei.c:4670 [inline]
__se_sys_renameat fs/namei.c:4667 [inline]
__x64_sys_renameat+0x96/0x100 fs/namei.c:4667
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f1ba7fe4059
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f1ba6959168 EFLAGS: 00000246 ORIG_RAX: 0000000000000108
RAX: ffffffffffffffda RBX: 00007f1ba80f6f60 RCX: 00007f1ba7fe4059
RDX: 0000000000000004 RSI: 0000000020000180 RDI: 0000000000000005
RBP: 00007f1ba69591d0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000200001c0 R11: 0000000000000246 R12: 0000000000000002
R13: 00007ffc9e2fe58f R14: 00007f1ba6959300 R15: 0000000000022000

The buggy address belongs to the page:
page:ffffea0002278780 count:2 mapcount:0 mapping:ffff88808e45e620 index:0xb0
flags: 0xfff00000001074(referenced|dirty|lru|active|private)
raw: 00fff00000001074 ffffea0001da14c8 ffffea00012763c8 ffff88808e45e620
raw: 00000000000000b0 ffff88804656ff18 00000002ffffffff ffff8880b59f68c0
page dumped because: kasan: bad access detected
page->mem_cgroup:ffff8880b59f68c0

Memory state around the buggy address:
ffff888089e1e500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888089e1e580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888089e1e600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
ffff888089e1e680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888089e1e700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
UDF-fs: warning (device loop4): udf_load_vrs: No VRS found
UDF-fs: Scanning with blocksize 1024 failed
UDF-fs: warning (device loop4): udf_load_vrs: No VRS found
UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2020/09/19 18:44 (1000)
UDF-fs: Scanning with blocksize 2048 failed


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

syzbot

unread,
Feb 5, 2022, 7:53:20 PM2/5/22
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=179c3ab4700000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=016c71588b119564cde8
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17b02908700000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=170ff584700000

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

RDX: 0000000000000004 RSI: 0000000020000180 RDI: 0000000000000005
RBP: 00007ffd44cabf80 R08: 0000000000000002 R09: 00007f5db2003231
R10: 00000000200001c0 R11: 0000000000000246 R12: 0000000000000006
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
==================================================================
BUG: KASAN: out-of-bounds in memset include/linux/string.h:362 [inline]
BUG: KASAN: out-of-bounds in udf_write_fi+0x8f9/0xf40 fs/udf/namei.c:93
Write of size 18446744073709551572 at addr ffff88808e6ea62c by task syz-executor075/8106

CPU: 0 PID: 8106 Comm: syz-executor075 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
kasan_report+0x8f/0xa0 mm/kasan/report.c:412
memset+0x20/0x40 mm/kasan/kasan.c:285
memset include/linux/string.h:362 [inline]
udf_write_fi+0x8f9/0xf40 fs/udf/namei.c:93
udf_rename+0xdb4/0x1270 fs/udf/namei.c:1185
vfs_rename+0x67e/0x1bc0 fs/namei.c:4479
do_renameat2+0xb59/0xc70 fs/namei.c:4629
__do_sys_renameat fs/namei.c:4670 [inline]
__se_sys_renameat fs/namei.c:4667 [inline]
__x64_sys_renameat+0x96/0x100 fs/namei.c:4667
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f5db2630579
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007ffd44cabf78 EFLAGS: 00000246 ORIG_RAX: 0000000000000108
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f5db2630579
RDX: 0000000000000004 RSI: 0000000020000180 RDI: 0000000000000005
RBP: 00007ffd44cabf80 R08: 0000000000000002 R09: 00007f5db2003231
R10: 00000000200001c0 R11: 0000000000000246 R12: 0000000000000006
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

The buggy address belongs to the page:
page:ffffea000239ba80 count:2 mapcount:0 mapping:ffff88808ff51be0 index:0xb0
flags: 0xfff00000001074(referenced|dirty|lru|active|private)
raw: 00fff00000001074 ffffea000241cf08 ffffea0002466c88 ffff88808ff51be0
raw: 00000000000000b0 ffff88808dbb6690 00000002ffffffff ffff8880b59f68c0
page dumped because: kasan: bad access detected
page->mem_cgroup:ffff8880b59f68c0

Memory state around the buggy address:
ffff88808e6ea500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88808e6ea580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88808e6ea600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
ffff88808e6ea680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88808e6ea700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Reply all
Reply to author
Forward
0 new messages