================================================================== BUG: KASAN: use-after-free in __gtp_encap_destroy+0x194/0x1b0 drivers/net/gtp.c:359 Read of size 8 at addr ffff888021abebd0 by task syz-executor.5/22145 CPU: 1 PID: 22145 Comm: syz-executor.5 Not tainted 5.11.0-rc4-next-20210121-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:397 [inline] kasan_report.cold+0x79/0xd5 mm/kasan/report.c:414 __gtp_encap_destroy+0x194/0x1b0 drivers/net/gtp.c:359 gtp_encap_destroy+0x16/0x20 drivers/net/gtp.c:373 udpv6_destroy_sock+0x1df/0x220 net/ipv6/udp.c:1608 sk_common_release+0x64/0x390 net/core/sock.c:3256 inet_release+0x12e/0x280 net/ipv4/af_inet.c:431 inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:475 __sock_release+0xcd/0x280 net/socket.c:597 sock_close+0x18/0x20 net/socket.c:1256 __fput+0x283/0x920 fs/file_table.c:280 task_work_run+0xdd/0x190 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:177 [inline] exit_to_user_mode_prepare+0x249/0x250 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:301 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:312 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x417b71 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 a4 1a 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007ffd0008db50 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000417b71 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000004 RBP: 0000000000000001 R08: 0000000000001c8c R09: 00000000017b3c90 R10: 00007ffd0008dc30 R11: 0000000000000293 R12: ffffffffffffffff R13: 000000000008ba51 R14: 00000000000003e8 R15: 000000000119bf8c Allocated by task 22150: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:403 [inline] ____kasan_kmalloc mm/kasan/common.c:434 [inline] ____kasan_kmalloc.constprop.0+0xa0/0xd0 mm/kasan/common.c:406 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x61/0xf0 mm/util.c:587 kvmalloc include/linux/mm.h:782 [inline] kvzalloc include/linux/mm.h:790 [inline] alloc_netdev_mqs+0x97/0xea0 net/core/dev.c:10563 rtnl_create_link+0x219/0xad0 net/core/rtnetlink.c:3171 __rtnl_newlink+0xf9b/0x16e0 net/core/rtnetlink.c:3433 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3491 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5553 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2348 ___sys_sendmsg+0xf3/0x170 net/socket.c:2402 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2435 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 22150: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357 ____kasan_slab_free.part.0+0xe1/0x110 mm/kasan/common.c:364 kasan_slab_free include/linux/kasan.h:191 [inline] slab_free_hook mm/slub.c:1565 [inline] slab_free_freelist_hook+0x82/0x1d0 mm/slub.c:1603 slab_free mm/slub.c:3164 [inline] kfree+0xe5/0x7b0 mm/slub.c:4205 kvfree+0x42/0x50 mm/util.c:616 netdev_freemem net/core/dev.c:10517 [inline] free_netdev+0x4a9/0x5e0 net/core/dev.c:10686 __rtnl_newlink+0x1484/0x16e0 net/core/rtnetlink.c:3447 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3491 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5553 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2494 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2348 ___sys_sendmsg+0xf3/0x170 net/socket.c:2402 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2435 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888021abe000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 3024 bytes inside of 4096-byte region [ffff888021abe000, ffff888021abf000) The buggy address belongs to the page: page:0000000098d9c301 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x21ab8 head:0000000098d9c301 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010042140 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888021abea80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888021abeb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888021abeb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888021abec00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888021abec80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================