Hello,
syzbot found the following crash on:
HEAD commit: dda0e292 Linux 4.19.114
git tree: linux-4.19.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=17756b5de00000
kernel config:
https://syzkaller.appspot.com/x/.config?x=f32ac7e5b2d5c341
dashboard link:
https://syzkaller.appspot.com/bug?extid=7a5cf69ec079d962792f
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
Unfortunately, I don't have any reproducer for this crash yet.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:
syzbot+7a5cf6...@syzkaller.appspotmail.com
netlink: 4 bytes leftover after parsing attributes in process `syz-executor.3'.
==================================================================
BUG: KASAN: use-after-free in vlan_dev_get_iflink+0x5f/0x70 net/8021q/vlan_dev.c:771
Read of size 4 at addr ffff88803f558888 by task syz-executor.3/6834
CPU: 1 PID: 6834 Comm: syz-executor.3 Not tainted 4.19.114-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+0x188/0x20d lib/dump_stack.c:118
print_address_description.cold+0x7c/0x212 mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report mm/kasan/report.c:412 [inline]
kasan_report.cold+0x88/0x2b9 mm/kasan/report.c:396
vlan_dev_get_iflink+0x5f/0x70 net/8021q/vlan_dev.c:771
dev_get_iflink+0x73/0xe0 net/core/dev.c:691
rfc2863_policy+0x1ca/0x230 net/core/link_watch.c:43
linkwatch_do_dev+0x17/0x110 net/core/link_watch.c:157
linkwatch_forget_dev+0x16a/0x200 net/core/link_watch.c:223
netdev_wait_allrefs net/core/dev.c:8862 [inline]
netdev_run_todo+0x242/0x740 net/core/dev.c:8958
rtnl_unlock net/core/rtnetlink.c:117 [inline]
rtnetlink_rcv_msg+0x460/0xaf0 net/core/rtnetlink.c:4778
netlink_rcv_skb+0x160/0x410 net/netlink/af_netlink.c:2455
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x4d7/0x6a0 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x80b/0xcd0 net/netlink/af_netlink.c:1909
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:632
___sys_sendmsg+0x803/0x920 net/socket.c:2115
__sys_sendmsg+0xec/0x1b0 net/socket.c:2153
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45c889
Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fd6b0da9c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fd6b0daa6d4 RCX: 000000000045c889
RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000006
RBP: 000000000076bfa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000000009fe R14: 00000000004ccba4 R15: 000000000076bfac
Allocated by task 6829:
set_track mm/kasan/kasan.c:460 [inline]
kasan_kmalloc mm/kasan/kasan.c:553 [inline]
kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:531
__do_kmalloc_node mm/slab.c:3689 [inline]
__kmalloc_node+0x4c/0x70 mm/slab.c:3696
kmalloc_node include/linux/slab.h:557 [inline]
kvmalloc_node+0x61/0xf0 mm/util.c:423
kvmalloc include/linux/mm.h:577 [inline]
kvzalloc include/linux/mm.h:585 [inline]
alloc_netdev_mqs+0x97/0xd50 net/core/dev.c:9122
rtnl_create_link+0x1d4/0xa30 net/core/rtnetlink.c:2869
rtnl_newlink+0xe1a/0x1440 net/core/rtnetlink.c:3131
rtnetlink_rcv_msg+0x453/0xaf0 net/core/rtnetlink.c:4777
netlink_rcv_skb+0x160/0x410 net/netlink/af_netlink.c:2455
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x4d7/0x6a0 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x80b/0xcd0 net/netlink/af_netlink.c:1909
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:632
___sys_sendmsg+0x803/0x920 net/socket.c:2115
__sys_sendmsg+0xec/0x1b0 net/socket.c:2153
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 6829:
set_track mm/kasan/kasan.c:460 [inline]
__kasan_slab_free+0xf7/0x140 mm/kasan/kasan.c:521
__cache_free mm/slab.c:3503 [inline]
kfree+0xce/0x220 mm/slab.c:3822
kvfree+0x59/0x60 mm/util.c:452
device_release+0x76/0x210 drivers/base/core.c:1061
kobject_cleanup lib/kobject.c:662 [inline]
kobject_release lib/kobject.c:691 [inline]
kref_put include/linux/kref.h:70 [inline]
kobject_put+0x17c/0x270 lib/kobject.c:708
netdev_run_todo+0x4f1/0x740 net/core/dev.c:8981
rtnl_unlock net/core/rtnetlink.c:117 [inline]
rtnetlink_rcv_msg+0x460/0xaf0 net/core/rtnetlink.c:4778
netlink_rcv_skb+0x160/0x410 net/netlink/af_netlink.c:2455
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x4d7/0x6a0 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x80b/0xcd0 net/netlink/af_netlink.c:1909
sock_sendmsg_nosec net/socket.c:622 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:632
___sys_sendmsg+0x803/0x920 net/socket.c:2115
__sys_sendmsg+0xec/0x1b0 net/socket.c:2153
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
The buggy address belongs to the object at ffff88803f558780
which belongs to the cache kmalloc-4096 of size 4096
The buggy address is located 264 bytes inside of
4096-byte region [ffff88803f558780, ffff88803f559780)
The buggy address belongs to the page:
page:ffffea0000fd5600 count:1 mapcount:0 mapping:ffff88812c3dcdc0 index:0x0 compound_mapcount: 0
flags: 0xfffe0000008100(slab|head)
raw: 00fffe0000008100 ffffea0001019208 ffffea00024ab788 ffff88812c3dcdc0
raw: 0000000000000000 ffff88803f558780 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88803f558780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88803f558800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88803f558880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88803f558900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88803f558980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.