================================================================== BUG: KASAN: slab-out-of-bounds in setup_udp_tunnel_sock+0x43d/0x520 net/ipv4/udp_tunnel.c:78 Write of size 1 at addr ffff88805dde97d0 by task syz-executor.1/18225 CPU: 1 PID: 18225 Comm: syz-executor.1 Not tainted 5.5.0-rc6-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 __asan_report_store1_noabort+0x17/0x20 mm/kasan/generic_report.c:137 setup_udp_tunnel_sock+0x43d/0x520 net/ipv4/udp_tunnel.c:78 gtp_encap_enable_socket+0x33f/0x420 drivers/net/gtp.c:827 gtp_encap_enable drivers/net/gtp.c:845 [inline] gtp_newlink+0x95/0xc60 drivers/net/gtp.c:666 __rtnl_newlink+0x109d/0x1790 net/core/rtnetlink.c:3310 rtnl_newlink+0x69/0xa0 net/core/rtnetlink.c:3368 rtnetlink_rcv_msg+0x45e/0xaf0 net/core/rtnetlink.c:5429 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5447 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x753/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45b349 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:00007fc3da050c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fc3da0516d4 RCX: 000000000045b349 RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000099e R14: 00000000004cb152 R15: 000000000075bf2c Allocated by task 18225: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:486 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:521 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc mm/slab.c:3320 [inline] kmem_cache_alloc+0x121/0x710 mm/slab.c:3484 sk_prot_alloc+0x67/0x310 net/core/sock.c:1597 sk_alloc+0x39/0xfd0 net/core/sock.c:1657 inet_create net/ipv4/af_inet.c:321 [inline] inet_create+0x363/0xe10 net/ipv4/af_inet.c:247 __sock_create+0x3ce/0x730 net/socket.c:1433 sock_create net/socket.c:1484 [inline] __sys_socket+0x103/0x220 net/socket.c:1526 __do_sys_socket net/socket.c:1535 [inline] __se_sys_socket net/socket.c:1533 [inline] __x64_sys_socket+0x73/0xb0 net/socket.c:1533 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x86/0x320 mm/slab.c:3694 sk_prot_free net/core/sock.c:1638 [inline] __sk_destruct+0x4e6/0x7f0 net/core/sock.c:1724 sk_destruct+0xd5/0x110 net/core/sock.c:1739 __sk_free+0xfb/0x3f0 net/core/sock.c:1750 sk_free+0x83/0xb0 net/core/sock.c:1761 sock_put include/net/sock.h:1719 [inline] sk_common_release+0x268/0x390 net/core/sock.c:3200 raw_close+0x22/0x30 net/ipv4/raw.c:704 inet_release+0xed/0x200 net/ipv4/af_inet.c:427 __sock_release+0x1d5/0x280 net/socket.c:605 sock_release+0x18/0x20 net/socket.c:625 inet_ctl_sock_destroy include/net/inet_common.h:57 [inline] tcp_sk_exit+0x185/0x240 net/ipv4/tcp_ipv4.c:2684 ops_exit_list.isra.0+0xb1/0x160 net/core/net_namespace.c:172 cleanup_net+0x549/0xb10 net/core/net_namespace.c:589 process_one_work+0x9af/0x1740 kernel/workqueue.c:2264 worker_thread+0x98/0xe40 kernel/workqueue.c:2410 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff88805dde9280 which belongs to the cache RAW(49:syz1) of size 1360 The buggy address is located 0 bytes to the right of 1360-byte region [ffff88805dde9280, ffff88805dde97d0) The buggy address belongs to the page: page:ffffea0001777a00 refcount:1 mapcount:0 mapping:ffff8880a7507e00 index:0xffff88805dde8680 compound_mapcount: 0 raw: 00fffe0000010200 ffff88809e8c4938 ffffea000288a188 ffff8880a7507e00 raw: ffff88805dde8680 ffff88805dde8080 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88805dde9680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805dde9700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805dde9780: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ^ ffff88805dde9800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805dde9880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================