KASAN: use-after-free Read in vxlan_fdb_destroy

6 views
Skip to first unread message

syzbot

unread,
Jan 20, 2021, 9:07:27 AM1/20/21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 43d555d8 Linux 4.19.169
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14d6cea4d00000
kernel config: https://syzkaller.appspot.com/x/.config?x=2c45e5cf79a63e8f
dashboard link: https://syzkaller.appspot.com/bug?extid=a268b2272571cb7bdfd7
compiler: gcc (GCC) 10.1.0-syz 20200507

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+a268b2...@syzkaller.appspotmail.com

Unknown ioctl 1074025674
==================================================================
BUG: KASAN: use-after-free in __hlist_del include/linux/list.h:676 [inline]
BUG: KASAN: use-after-free in hlist_del_rcu include/linux/rculist.h:457 [inline]
BUG: KASAN: use-after-free in vxlan_fdb_destroy+0x1cc/0x1f0 drivers/net/vxlan.c:788
Read of size 8 at addr ffff8880b422a900 by task syz-executor.3/19251

CPU: 1 PID: 19251 Comm: syz-executor.3 Not tainted 4.19.169-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_load8_noabort+0x88/0x90 mm/kasan/report.c:433
__hlist_del include/linux/list.h:676 [inline]
hlist_del_rcu include/linux/rculist.h:457 [inline]
vxlan_fdb_destroy+0x1cc/0x1f0 drivers/net/vxlan.c:788
__vxlan_dev_create+0x477/0x820 drivers/net/vxlan.c:3277
vxlan_newlink+0xc0/0x120 drivers/net/vxlan.c:3504
rtnl_newlink+0x1027/0x15b0 net/core/rtnetlink.c:3141
rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4778
netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2455
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x6bb/0xc40 net/netlink/af_netlink.c:1909
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xc3/0x120 net/socket.c:632
sock_no_sendpage+0xf5/0x140 net/core/sock.c:2668
kernel_sendpage net/socket.c:3378 [inline]
sock_sendpage+0xdf/0x140 net/socket.c:847
pipe_to_sendpage+0x268/0x330 fs/splice.c:452
splice_from_pipe_feed fs/splice.c:503 [inline]
__splice_from_pipe+0x389/0x800 fs/splice.c:627
splice_from_pipe fs/splice.c:662 [inline]
generic_splice_sendpage+0xd4/0x140 fs/splice.c:833
do_splice_from fs/splice.c:852 [inline]
do_splice fs/splice.c:1154 [inline]
__do_sys_splice fs/splice.c:1428 [inline]
__se_sys_splice+0xfe7/0x16d0 fs/splice.c:1408
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45e219
Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f6a2bf83c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 000000000045e219
RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 000000000119c080 R08: 000000000004ffe2 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119c034
R13: 00007ffec6ee953f R14: 00007f6a2bf849c0 R15: 000000000119c034

Allocated by task 19251:
kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625
kmalloc include/linux/slab.h:515 [inline]
vxlan_fdb_alloc drivers/net/vxlan.c:646 [inline]
vxlan_fdb_create+0x163/0x690 drivers/net/vxlan.c:674
__vxlan_dev_create+0x417/0x820 drivers/net/vxlan.c:3243
vxlan_newlink+0xc0/0x120 drivers/net/vxlan.c:3504
rtnl_newlink+0x1027/0x15b0 net/core/rtnetlink.c:3141
rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4778
netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2455
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x6bb/0xc40 net/netlink/af_netlink.c:1909
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xc3/0x120 net/socket.c:632
sock_no_sendpage+0xf5/0x140 net/core/sock.c:2668
kernel_sendpage net/socket.c:3378 [inline]
sock_sendpage+0xdf/0x140 net/socket.c:847
pipe_to_sendpage+0x268/0x330 fs/splice.c:452
splice_from_pipe_feed fs/splice.c:503 [inline]
__splice_from_pipe+0x389/0x800 fs/splice.c:627
splice_from_pipe fs/splice.c:662 [inline]
generic_splice_sendpage+0xd4/0x140 fs/splice.c:833
do_splice_from fs/splice.c:852 [inline]
do_splice fs/splice.c:1154 [inline]
__do_sys_splice fs/splice.c:1428 [inline]
__se_sys_splice+0xfe7/0x16d0 fs/splice.c:1408
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 18:
__cache_free mm/slab.c:3503 [inline]
kfree+0xcc/0x210 mm/slab.c:3822
__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+0x26c/0x9a0 kernel/softirq.c:292

The buggy address belongs to the object at ffff8880b422a900
which belongs to the cache kmalloc-96 of size 96
The buggy address is located 0 bytes inside of
96-byte region [ffff8880b422a900, ffff8880b422a960)
The buggy address belongs to the page:
page:ffffea0002d08a80 count:1 mapcount:0 mapping:ffff88813bff04c0 index:0x0
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffffea00024cafc8 ffffea000122aa48 ffff88813bff04c0
raw: 0000000000000000 ffff8880b422a000 0000000100000020 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff8880b422a800: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff8880b422a880: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
>ffff8880b422a900: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
^
ffff8880b422a980: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
ffff8880b422aa00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
==================================================================
Bluetooth: hci5: command 0x0406 tx timeout
overlayfs: upperdir is in-use as upperdir/workdir of another mount, mount with '-o index=off' to override exclusive upperdir protection.
Unknown ioctl 1074025689


---
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,
Jun 27, 2021, 3:15:12 AM6/27/21
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