syzbot


KASAN: use-after-free Read in crc16

Status: auto-closed as invalid on 2022/01/06 08:36
Reported-by: syzbot+b633bdcf55b8190edd20@syzkaller.appspotmail.com
First crash: 1172d, last: 1172d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-414 KASAN: use-after-free Read in crc16 1 1841d 1841d 0/1 auto-closed as invalid on 2020/03/07 19:58
upstream KASAN: slab-out-of-bounds Read in crc16 ext4 1 1109d 1104d 0/28 auto-closed as invalid on 2022/01/08 22:27

Sample crash report:
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
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/08 08:35 linux-4.19.y b172b44fcb17 064c9eb7 .config console log report info ci2-linux-4-19 KASAN: use-after-free Read in crc16
* Struck through repros no longer work on HEAD.