================================================================== 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 ffff88809eb28188 by task syz-executor.0/32697 CPU: 1 PID: 32697 Comm: syz-executor.0 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:00007f98f8588c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000002f3c0 RCX: 000000000045c1f9 RDX: 0000000000000010 RSI: 0000000000000084 RDI: 0000000000000008 RBP: 000000000078bf50 R08: 0000000000000008 R09: 0000000000000000 R10: 00000000200000c0 R11: 0000000000000246 R12: 000000000078bf0c R13: 00007ffca6be43af R14: 00007f98f85899c0 R15: 000000000078bf0c Allocated by task 32697: 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 32328: 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 kfree_const+0x51/0x60 mm/util.c:40 kernfs_put.part.0+0x159/0x540 fs/kernfs/dir.c:528 kernfs_put+0x42/0x50 fs/kernfs/dir.c:511 sysfs_put include/linux/sysfs.h:611 [inline] kobject_del+0xfc/0x1f0 lib/kobject.c:631 device_del+0x86a/0xd20 drivers/base/core.c:2869 rollback_registered_many+0xa07/0xf60 net/core/dev.c:9013 unregister_netdevice_many.part.0+0x1a/0x2f0 net/core/dev.c:10131 unregister_netdevice_many+0x36/0x50 net/core/dev.c:10130 rtnl_delete_link net/core/rtnetlink.c:2953 [inline] rtnl_dellink+0x351/0xa70 net/core/rtnetlink.c:3005 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5460 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2470 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:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2363 ___sys_sendmsg+0xf3/0x170 net/socket.c:2417 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2450 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 ffff88809eb28180 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 8 bytes inside of 32-byte region [ffff88809eb28180, ffff88809eb281a0) The buggy address belongs to the page: page:ffffea00027aca00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88809eb28fc1 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00024db488 ffffea0002731d48 ffff8880aa0001c0 raw: ffff88809eb28fc1 ffff88809eb28000 0000000100000020 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809eb28080: 05 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc ffff88809eb28100: 05 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc >ffff88809eb28180: 00 fc fc fc fc fc fc fc 07 fc fc fc fc fc fc fc ^ ffff88809eb28200: 07 fc fc fc fc fc fc fc 07 fc fc fc fc fc fc fc ffff88809eb28280: 04 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================