================================================================== BUG: KASAN: slab-out-of-bounds in sctp_setsockopt_delayed_ack net/sctp/socket.c:2773 [inline] BUG: KASAN: slab-out-of-bounds in sctp_setsockopt net/sctp/socket.c:4499 [inline] BUG: KASAN: slab-out-of-bounds in sctp_setsockopt+0x91b5/0x95e0 net/sctp/socket.c:4431 Write of size 4 at addr ffff88803cce7288 by task syz-executor.3/7277 CPU: 1 PID: 7277 Comm: syz-executor.3 Not tainted 5.8.0-rc4-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+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x436 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 sctp_setsockopt_delayed_ack net/sctp/socket.c:2773 [inline] sctp_setsockopt net/sctp/socket.c:4499 [inline] sctp_setsockopt+0x91b5/0x95e0 net/sctp/socket.c:4431 __sys_setsockopt+0x337/0x6a0 net/socket.c:2137 __do_sys_setsockopt net/socket.c:2153 [inline] __se_sys_setsockopt net/socket.c:2150 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2150 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45c1f9 Code: Bad RIP value. RSP: 002b:00007f4919fe0c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000002e900 RCX: 000000000045c1f9 RDX: 0000000000000010 RSI: 0000000000000084 RDI: 0000000000000003 RBP: 000000000078bf50 R08: 0000000000000008 R09: 0000000000000000 R10: 00000000200000c0 R11: 0000000000000246 R12: 000000000078bf0c R13: 00007fff2758562f R14: 00007f4919fe19c0 R15: 000000000078bf0c Allocated by task 7277: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc_track_caller+0x178/0x330 mm/slab.c:3671 memdup_user+0x22/0xd0 mm/util.c:172 sctp_setsockopt net/sctp/socket.c:4452 [inline] sctp_setsockopt+0x17a/0x95e0 net/sctp/socket.c:4431 __sys_setsockopt+0x337/0x6a0 net/socket.c:2137 __do_sys_setsockopt net/socket.c:2153 [inline] __se_sys_setsockopt net/socket.c:2150 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2150 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 5340: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0xf5/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x103/0x2c0 mm/slab.c:3757 kobject_uevent_env+0x296/0x12c0 lib/kobject_uevent.c:624 device_add+0xa64/0x1b00 drivers/base/core.c:2661 netdev_register_kobject+0x17d/0x3b0 net/core/net-sysfs.c:1888 register_netdevice+0xd29/0x1540 net/core/dev.c:9532 __ip_tunnel_create+0x398/0x580 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x32b/0x980 net/ipv4/ip_tunnel.c:1072 ops_init+0xaf/0x470 net/core/net_namespace.c:151 setup_net+0x2d8/0x850 net/core/net_namespace.c:341 copy_net_ns+0x2cf/0x5e0 net/core/net_namespace.c:482 create_new_namespaces+0x3f6/0xb10 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:231 ksys_unshare+0x36c/0x9a0 kernel/fork.c:2979 __do_sys_unshare kernel/fork.c:3047 [inline] __se_sys_unshare kernel/fork.c:3045 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:3045 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88803cce7280 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 8 bytes inside of 32-byte region [ffff88803cce7280, ffff88803cce72a0) The buggy address belongs to the page: page:ffffea0000f339c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88803cce7fc1 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002a4af08 ffffea0000e10348 ffff8880aa0001c0 raw: ffff88803cce7fc1 ffff88803cce7000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88803cce7180: 05 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff88803cce7200: 04 fc fc fc fc fc fc fc 00 00 fc fc fc fc fc fc >ffff88803cce7280: 00 fc fc fc fc fc fc fc 06 fc fc fc fc fc fc fc ^ ffff88803cce7300: 05 fc fc fc fc fc fc fc 00 00 06 fc fc fc fc fc ffff88803cce7380: 05 fc fc fc fc fc fc fc 06 fc fc fc fc fc fc fc ==================================================================