KASAN: use-after-free Read in crc16

8 views
Skip to first unread message

syzbot

unread,
Sep 8, 2021, 4:36:30 AM9/8/21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: b172b44fcb17 Linux 4.19.206
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17d7eaa5300000
kernel config: https://syzkaller.appspot.com/x/.config?x=b9ba3521ce0be3cd
dashboard link: https://syzkaller.appspot.com/bug?extid=b633bdcf55b8190edd20
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+b633bd...@syzkaller.appspotmail.com

FAT-fs (loop2): bogus number of reserved sectors
FAT-fs (loop2): Can't find a valid FAT filesystem
wlan1: Trigger new scan to find an IBSS to join
audit: type=1804 audit(1631090114.133:14): pid=10605 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.4" name="/root/syzkaller-testdir621651798/syzkaller.EufOSs/27/file0" dev="sda1" ino=14039 res=1
==================================================================
BUG: KASAN: use-after-free in crc16+0xcb/0xe0 lib/crc16.c:60
Read of size 1 at addr ffff8880a59b1000 by task syz-executor.1/10566

CPU: 1 PID: 10566 Comm: syz-executor.1 Not tainted 4.19.206-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 mm/kasan/report.c:412 [inline]
__asan_report_load1_noabort+0x88/0x90 mm/kasan/report.c:430
crc16+0xcb/0xe0 lib/crc16.c:60
ext4_group_desc_csum+0x6f6/0x850 fs/ext4/super.c:2426
ext4_group_desc_csum_verify+0x142/0x1b0 fs/ext4/super.c:2438
ext4_check_descriptors fs/ext4/super.c:2553 [inline]
ext4_fill_super+0x57df/0xc850 fs/ext4/super.c:4244
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x467b1a
Code: 48 c7 c2 bc ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f48a235afa8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 0000000000467b1a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f48a235b000
RBP: 00007f48a235b040 R08: 00007f48a235b040 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000
R13: 0000000020000100 R14: 00007f48a235b000 R15: 00000000200000c0

Allocated by task 14:
kmem_cache_alloc+0x122/0x370 mm/slab.c:3559
dst_alloc+0x106/0x1a0 net/core/dst.c:105
ip6_dst_alloc+0x2e/0x100 net/ipv6/route.c:357
icmp6_dst_alloc+0x1ab/0x660 net/ipv6/route.c:2731
ndisc_send_skb+0xd10/0x1720 net/ipv6/ndisc.c:471
ndisc_send_ns+0x51d/0x840 net/ipv6/ndisc.c:633
addrconf_dad_work+0xb0e/0x10a0 net/ipv6/addrconf.c:4076
process_one_work+0x864/0x1570 kernel/workqueue.c:2153
worker_thread+0x64c/0x1130 kernel/workqueue.c:2296
kthread+0x33f/0x460 kernel/kthread.c:259
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Freed by task 8151:
__cache_free mm/slab.c:3503 [inline]
kmem_cache_free+0x7f/0x260 mm/slab.c:3765
dst_destroy+0x2bc/0x400 net/core/dst.c:141
__rcu_reclaim kernel/rcu/rcu.h:236 [inline]
rcu_do_batch kernel/rcu/tree.c:2584 [inline]
invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline]
__rcu_process_callbacks kernel/rcu/tree.c:2864 [inline]
rcu_process_callbacks+0x8ff/0x18b0 kernel/rcu/tree.c:2881
__do_softirq+0x265/0x980 kernel/softirq.c:292

The buggy address belongs to the object at ffff8880a59b1000
which belongs to the cache ip6_dst_cache of size 240
The buggy address is located 0 bytes inside of
240-byte region [ffff8880a59b1000, ffff8880a59b10f0)
The buggy address belongs to the page:
page:ffffea0002966c40 count:1 mapcount:0 mapping:ffff888235928c40 index:0xffff8880a59b13c0
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffffea0002931388 ffffea0002a1ebc8 ffff888235928c40
raw: ffff8880a59b13c0 ffff8880a59b1000 0000000100000008 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff8880a59b0f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880a59b0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880a59b1000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880a59b1080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
ffff8880a59b1100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
==================================================================


---
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,
Jan 6, 2022, 3:36:24 AM1/6/22
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages