sctp: [Deprecated]: syz-executor.4 (pid 15020) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead ================================================================== 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 ffff888093d90c08 by task syz-executor.4/15020 CPU: 1 PID: 15020 Comm: syz-executor.4 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:0x45c1d9 Code: Bad RIP value. RSP: 002b:00007f59ef3cac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000002eb80 RCX: 000000000045c1d9 RDX: 0000000000000010 RSI: 0000000000000084 RDI: 0000000000000003 RBP: 000000000078bf50 R08: 0000000000000008 R09: 0000000000000000 R10: 0000000020000100 R11: 0000000000000246 R12: 000000000078bf0c R13: 00007ffea8a53e4f R14: 00007f59ef3cb9c0 R15: 000000000078bf0c Allocated by task 15020: 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 21: 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 security_sk_free+0x3e/0x70 security/security.c:2185 sk_prot_free net/core/sock.c:1707 [inline] __sk_destruct+0x537/0x860 net/core/sock.c:1796 sk_destruct+0xbd/0xe0 net/core/sock.c:1811 __sk_free+0xef/0x3d0 net/core/sock.c:1822 sk_free net/core/sock.c:1833 [inline] sock_put include/net/sock.h:1776 [inline] sk_common_release+0x29c/0x390 net/core/sock.c:3252 inet_release+0x12e/0x280 net/ipv4/af_inet.c:431 inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:475 __sock_release net/socket.c:596 [inline] sock_release+0x87/0x1b0 net/socket.c:624 inet_ctl_sock_destroy include/net/inet_common.h:63 [inline] igmp6_net_exit+0x6b/0x170 net/ipv6/mcast.c:2993 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:186 cleanup_net+0x4ea/0xa00 net/core/net_namespace.c:603 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:291 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 The buggy address belongs to the object at ffff888093d90c00 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 8 bytes inside of 32-byte region [ffff888093d90c00, ffff888093d90c20) The buggy address belongs to the page: page:ffffea00024f6400 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888093d90fc1 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00025fd5c8 ffffea0002770048 ffff8880aa0001c0 raw: ffff888093d90fc1 ffff888093d90000 0000000100000034 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888093d90b00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff888093d90b80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff888093d90c00: 00 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff888093d90c80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff888093d90d00: 00 00 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================