================================================================== BUG: KASAN: slab-out-of-bounds in __write_once_size include/linux/compiler.h:220 [inline] BUG: KASAN: slab-out-of-bounds in __hlist_del include/linux/list.h:702 [inline] BUG: KASAN: slab-out-of-bounds in hlist_del_init include/linux/list.h:717 [inline] BUG: KASAN: slab-out-of-bounds in __xfrm_policy_unlink+0x977/0xa00 net/xfrm/xfrm_policy.c:2213 IPVS: ftp: loaded support on port[0] = 21 Write of size 8 at addr ffff8880a4e39168 by task syz-executor1/6045 CPU: 0 PID: 6045 Comm: syz-executor1 Not tainted 5.0.0-rc3+ #21 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+0x1db/0x2d0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_store8_noabort+0x17/0x20 mm/kasan/generic_report.c:140 __write_once_size include/linux/compiler.h:220 [inline] __hlist_del include/linux/list.h:702 [inline] hlist_del_init include/linux/list.h:717 [inline] __xfrm_policy_unlink+0x977/0xa00 net/xfrm/xfrm_policy.c:2213 xfrm_policy_flush+0x331/0x460 net/xfrm/xfrm_policy.c:1789 pfkey_spdflush+0xaf/0x3c0 net/key/af_key.c:2785 pfkey_process+0x6d2/0x810 net/key/af_key.c:2844 pfkey_sendmsg+0x5bb/0xfc0 net/key/af_key.c:3683 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:631 ___sys_sendmsg+0x409/0x910 net/socket.c:2116 __sys_sendmmsg+0x246/0x730 net/socket.c:2211 __do_sys_sendmmsg net/socket.c:2240 [inline] __se_sys_sendmmsg net/socket.c:2237 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2237 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458099 Code: 6d b7 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 3b b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ff85ebc4c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000458099 RDX: 0400000000000117 RSI: 0000000020000180 RDI: 0000000000000005 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff85ebc56d4 R13: 00000000004c5000 R14: 00000000004d8bc8 R15: 00000000ffffffff Allocated by task 32510: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc mm/kasan/common.c:496 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:469 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:504 __do_kmalloc mm/slab.c:3711 [inline] __kmalloc+0x15c/0x740 mm/slab.c:3720 kmalloc include/linux/slab.h:550 [inline] kzalloc include/linux/slab.h:740 [inline] __register_sysctl_table+0xc7/0xff0 fs/proc/proc_sysctl.c:1306 register_net_sysctl+0x29/0x30 net/sysctl_net.c:120 neigh_sysctl_register+0x3a5/0x730 net/core/neighbour.c:3664 devinet_sysctl_register+0xb6/0x220 net/ipv4/devinet.c:2556 inetdev_init+0x2d4/0x5d0 net/ipv4/devinet.c:274 inetdev_event+0xed5/0x1330 net/ipv4/devinet.c:1480 notifier_call_chain+0x179/0x380 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1739 call_netdevice_notifiers_extack net/core/dev.c:1751 [inline] call_netdevice_notifiers net/core/dev.c:1765 [inline] register_netdevice+0xae0/0x10b0 net/core/dev.c:8658 ieee80211_if_add+0x1180/0x1a80 net/mac80211/iface.c:1886 ieee80211_register_hw+0x34c6/0x3f30 net/mac80211/main.c:1226 mac80211_hwsim_new_radio+0x2018/0x36b0 drivers/net/wireless/mac80211_hwsim.c:2921 hwsim_new_radio_nl+0xca6/0x1430 drivers/net/wireless/mac80211_hwsim.c:3469 genl_family_rcv_msg+0x80d/0x11a0 net/netlink/genetlink.c:601 kobject: 'rx-0' (000000007689ee2a): fill_kobj_path: path = '/devices/virtual/net/tunl0/queues/rx-0' genl_rcv_msg+0xca/0x16c net/netlink/genetlink.c:626 netlink_rcv_skb+0x17d/0x410 net/netlink/af_netlink.c:2485 genl_rcv+0x29/0x40 net/netlink/genetlink.c:637 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline] netlink_unicast+0x574/0x770 net/netlink/af_netlink.c:1336 netlink_sendmsg+0xa05/0xf90 net/netlink/af_netlink.c:1925 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:631 kobject: 'tx-0' (0000000002b20127): kobject_add_internal: parent: 'queues', set: 'queues' ___sys_sendmsg+0x7ec/0x910 net/socket.c:2116 __sys_sendmsg+0x112/0x270 net/socket.c:2154 __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg net/socket.c:2161 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2161 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe kobject: 'tx-0' (0000000002b20127): kobject_uevent_env Freed by task 31315: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:458 kasan_slab_free+0xe/0x10 mm/kasan/common.c:466 __cache_free mm/slab.c:3487 [inline] kfree+0xcf/0x230 mm/slab.c:3806 skb_free_head+0x93/0xb0 net/core/skbuff.c:553 kobject: 'tx-0' (0000000002b20127): fill_kobj_path: path = '/devices/virtual/net/tunl0/queues/tx-0' skb_release_data+0x6ea/0x970 net/core/skbuff.c:573 skb_release_all+0x4d/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] consume_skb net/core/skbuff.c:701 [inline] consume_skb+0x18c/0x550 net/core/skbuff.c:695 sctp_chunk_destroy net/sctp/sm_make_chunk.c:1462 [inline] sctp_chunk_put+0x2b7/0x430 net/sctp/sm_make_chunk.c:1489 sctp_chunk_free+0x56/0x70 net/sctp/sm_make_chunk.c:1476 sctp_inq_free+0x262/0x3b0 net/sctp/inqueue.c:71 sctp_association_free+0x2ec/0x93a net/sctp/associola.c:368 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:939 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1353 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1220 [inline] sctp_do_sm+0x4629/0x7020 net/sctp/sm_sideeffect.c:1191 sctp_assoc_bh_rcv+0x343/0x660 net/sctp/associola.c:1074 sctp_inq_push+0x288/0x3a0 net/sctp/inqueue.c:95 kobject: 'gre0' (0000000035bd5344): kobject_add_internal: parent: 'net', set: 'devices' sctp_backlog_rcv+0x196/0xd30 net/sctp/input.c:354 sk_backlog_rcv include/net/sock.h:936 [inline] __release_sock+0x12e/0x3a0 net/core/sock.c:2309 release_sock+0xac/0x2b0 net/core/sock.c:2825 kobject: 'loop4' (00000000ebdf1b99): kobject_uevent_env sctp_setsockopt net/sctp/socket.c:4530 [inline] sctp_setsockopt+0x276/0x6f80 net/sctp/socket.c:4344 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3016 __sys_setsockopt+0x1b0/0x3a0 net/socket.c:1902 kobject: 'gre0' (0000000035bd5344): kobject_uevent_env __do_sys_setsockopt net/socket.c:1913 [inline] __se_sys_setsockopt net/socket.c:1910 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1910 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe kobject: 'loop4' (00000000ebdf1b99): fill_kobj_path: path = '/devices/virtual/block/loop4' The buggy address belongs to the object at ffff8880a4e38dc0 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 936 bytes inside of 1024-byte region [ffff8880a4e38dc0, ffff8880a4e391c0) The buggy address belongs to the page: page:ffffea0002938e00 count:1 mapcount:0 mapping:ffff88812c3f0ac0 index:0x0 compound_mapcount: 0 kobject: 'gre0' (0000000035bd5344): fill_kobj_path: path = '/devices/virtual/net/gre0' flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002806008 ffffea0001079788 ffff88812c3f0ac0 raw: 0000000000000000 ffff8880a4e38040 0000000100000007 0000000000000000 kobject: 'queues' (00000000bb3d685d): kobject_add_internal: parent: 'gre0', set: '' page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a4e39000: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a4e39080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a4e39100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc kobject: 'queues' (00000000bb3d685d): kobject_uevent_env ^ ffff8880a4e39180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a4e39200: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================