Hello,
syzbot found the following issue on:
HEAD commit: 4edbf74132a4 Linux 4.14.294
git tree: linux-4.14.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=156691e4880000
kernel config:
https://syzkaller.appspot.com/x/.config?x=94d4cf9c4e23980f
dashboard link:
https://syzkaller.appspot.com/bug?extid=56e4d8da000b89003187
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=112fcdc4880000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=165943c4880000
Downloadable assets:
disk image:
https://storage.googleapis.com/b40da19b4827/disk-4edbf741.raw.xz
vmlinux:
https://storage.googleapis.com/a36e39677c18/vmlinux-4edbf741.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+56e4d8...@syzkaller.appspotmail.com
UDF-fs: Scanning with blocksize 1024 failed
UDF-fs: warning (device loop0): udf_load_vrs: No VRS found
UDF-fs: Scanning with blocksize 2048 failed
UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2022/09/12 12:00 (1000)
==================================================================
BUG: KASAN: slab-out-of-bounds in udf_write_aext+0x7b3/0x7d0 fs/udf/inode.c:2070
Write of size 4 at addr ffff8880b3018938 by task syz-executor202/7975
CPU: 1 PID: 7975 Comm: syz-executor202 Not tainted 4.14.294-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b2/0x281 lib/dump_stack.c:58
print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
kasan_report mm/kasan/report.c:409 [inline]
__asan_report_store_n_noabort+0x6b/0x80 mm/kasan/report.c:446
udf_write_aext+0x7b3/0x7d0 fs/udf/inode.c:2070
udf_add_entry+0xc54/0x2710 fs/udf/namei.c:501
udf_mkdir+0x122/0x620 fs/udf/namei.c:699
vfs_mkdir+0x463/0x6e0 fs/namei.c:3851
SYSC_mkdirat fs/namei.c:3874 [inline]
SyS_mkdirat+0x1fd/0x270 fs/namei.c:3858
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7f7826698249
RSP: 002b:00007ffc67cd0e08 EFLAGS: 00000246 ORIG_RAX: 0000000000000053
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7826698249
RDX: 00007f78266567e3 RSI: 0000000000000000 RDI: 0000000020000580
RBP: 00007f7826657ab0 R08: 0000000000000000 R09: 0000000000000000
R10: 00007ffc67cd0cd0 R11: 0000000000000246 R12: 00007f7826657b40
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 7975:
save_stack mm/kasan/kasan.c:447 [inline]
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
__do_kmalloc mm/slab.c:3720 [inline]
__kmalloc+0x15a/0x400 mm/slab.c:3729
kmalloc include/linux/slab.h:493 [inline]
kzalloc include/linux/slab.h:661 [inline]
udf_new_inode+0x98d/0xce0 fs/udf/ialloc.c:70
udf_mkdir+0x95/0x620 fs/udf/namei.c:692
vfs_mkdir+0x463/0x6e0 fs/namei.c:3851
SYSC_mkdirat fs/namei.c:3874 [inline]
SyS_mkdirat+0x1fd/0x270 fs/namei.c:3858
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
Freed by task 6227:
save_stack mm/kasan/kasan.c:447 [inline]
set_track mm/kasan/kasan.c:459 [inline]
kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
__cache_free mm/slab.c:3496 [inline]
kfree+0xc9/0x250 mm/slab.c:3815
uevent_show+0x27e/0x330 drivers/base/core.c:1011
dev_attr_show+0x4f/0xc0 drivers/base/core.c:722
sysfs_kf_seq_show+0x1dd/0x420 fs/sysfs/file.c:64
seq_read+0x4e4/0x1180 fs/seq_file.c:240
kernfs_fop_read+0xd7/0x500 fs/kernfs/file.c:252
__vfs_read+0xe4/0x620 fs/read_write.c:411
vfs_read+0x139/0x340 fs/read_write.c:447
SYSC_read fs/read_write.c:574 [inline]
SyS_read+0xf2/0x210 fs/read_write.c:567
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
The buggy address belongs to the object at ffff8880b3018940
which belongs to the cache kmalloc-4096 of size 4096
The buggy address is located 8 bytes to the left of
4096-byte region [ffff8880b3018940, ffff8880b3019940)
The buggy address belongs to the page:
page:ffffea0002cc0600 count:1 mapcount:0 mapping:ffff8880b3018940 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff8880b3018940 0000000000000000 0000000100000001
raw: ffffea0002cc2920 ffffea00025507a0 ffff88813fe74dc0 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8880b3018800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880b3018880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880b3018900: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
^
ffff8880b3018980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880b3018a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
---
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 can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches