Hello,
syzbot found the following issue on:
HEAD commit: cbfa1702 Linux 4.14.198
git tree: linux-4.14.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=148bc8d3900000
kernel config:
https://syzkaller.appspot.com/x/.config?x=3990958d85b55e59
dashboard link:
https://syzkaller.appspot.com/bug?extid=bcbc661df46657d0fa4f
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=11fe6f8b900000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=104850d3900000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+bcbc66...@syzkaller.appspotmail.com
audit: type=1400 audit(1600757858.237:8): avc: denied { execmem } for pid=6344 comm="syz-executor101" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
==================================================================
BUG: KASAN: slab-out-of-bounds in squashfs_get_id+0x181/0x1a0 fs/squashfs/id.c:51
Read of size 8 at addr ffff88809fbd46b8 by task syz-executor101/6344
CPU: 1 PID: 6344 Comm: syz-executor101 Not tainted 4.14.198-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b2/0x283 lib/dump_stack.c:58
print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351
kasan_report mm/kasan/report.c:409 [inline]
__asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
squashfs_get_id+0x181/0x1a0 fs/squashfs/id.c:51
squashfs_new_inode fs/squashfs/inode.c:68 [inline]
squashfs_read_inode+0x1a2/0x1840 fs/squashfs/inode.c:133
squashfs_fill_super+0x1138/0x1640 fs/squashfs/super.c:318
mount_bdev+0x2b3/0x360 fs/super.c:1134
mount_fs+0x92/0x2a0 fs/super.c:1237
vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
vfs_kern_mount fs/namespace.c:1036 [inline]
do_new_mount fs/namespace.c:2549 [inline]
do_mount+0xe53/0x2a00 fs/namespace.c:2879
SYSC_mount fs/namespace.c:3095 [inline]
SyS_mount+0xa8/0x120 fs/namespace.c:3072
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x446d2a
RSP: 002b:00007ffcd9ed2558 EFLAGS: 00000293 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffcd9ed25b0 RCX: 0000000000446d2a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffcd9ed2570
RBP: 00007ffcd9ed2570 R08: 00007ffcd9ed25b0 R09: 00007ffc00000015
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000001
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003
Allocated by task 6344:
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_array include/linux/slab.h:607 [inline]
kcalloc include/linux/slab.h:618 [inline]
squashfs_read_data+0x153/0x1140 fs/squashfs/block.c:100
squashfs_read_table+0x11c/0x18d fs/squashfs/cache.c:445
squashfs_read_xattr_id_table+0x16d/0x1c0 fs/squashfs/xattr_id.c:94
squashfs_fill_super+0xcba/0x1640 fs/squashfs/super.c:233
mount_bdev+0x2b3/0x360 fs/super.c:1134
mount_fs+0x92/0x2a0 fs/super.c:1237
vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
vfs_kern_mount fs/namespace.c:1036 [inline]
do_new_mount fs/namespace.c:2549 [inline]
do_mount+0xe53/0x2a00 fs/namespace.c:2879
SYSC_mount fs/namespace.c:3095 [inline]
SyS_mount+0xa8/0x120 fs/namespace.c:3072
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
Freed by task 6344:
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
squashfs_read_data+0x931/0x1140 fs/squashfs/block.c:205
squashfs_read_table+0x11c/0x18d fs/squashfs/cache.c:445
squashfs_read_xattr_id_table+0x16d/0x1c0 fs/squashfs/xattr_id.c:94
squashfs_fill_super+0xcba/0x1640 fs/squashfs/super.c:233
mount_bdev+0x2b3/0x360 fs/super.c:1134
mount_fs+0x92/0x2a0 fs/super.c:1237
vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
vfs_kern_mount fs/namespace.c:1036 [inline]
do_new_mount fs/namespace.c:2549 [inline]
do_mount+0xe53/0x2a00 fs/namespace.c:2879
SYSC_mount fs/namespace.c:3095 [inline]
SyS_mount+0xa8/0x120 fs/namespace.c:3072
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 ffff88809fbd4680
which belongs to the cache kmalloc-32 of size 32
The buggy address is located 24 bytes to the right of
32-byte region [ffff88809fbd4680, ffff88809fbd46a0)
The buggy address belongs to the page:
page:ffffea00027ef500 count:1 mapcount:0 mapping:ffff88809fbd4000 index:0xffff88809fbd4fc1
flags: 0xfffe0000000100(slab)
raw: 00fffe0000000100 ffff88809fbd4000 ffff88809fbd4fc1 0000000100000039
raw: ffffea0002841aa0 ffffea00027900a0 ffff88812fe501c0 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88809fbd4580: fb fb fb fb fc fc fc fc 00 fc fc fc fc fc fc fc
ffff88809fbd4600: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
>ffff88809fbd4680: fb fb fb fb fc fc fc fc 00 04 fc fc fc fc fc fc
^
ffff88809fbd4700: 00 04 fc fc fc fc fc fc 00 04 fc fc fc fc fc fc
ffff88809fbd4780: 00 04 fc fc fc fc fc fc 00 04 fc fc fc fc fc fc
==================================================================
---
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