================================================================== BUG: KASAN: slab-out-of-bounds in ipv6_addr_equal include/net/ipv6.h:507 [inline] BUG: KASAN: slab-out-of-bounds in __sctp_v6_cmp_addr+0x4c7/0x530 net/sctp/ipv6.c:580 Read of size 8 at addr ffff8801d0f65750 by task syz-executor3/7357 CPU: 0 PID: 7357 Comm: syz-executor3 Not tainted 4.17.0-rc1+ #10 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+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 ipv6_addr_equal include/net/ipv6.h:507 [inline] __sctp_v6_cmp_addr+0x4c7/0x530 net/sctp/ipv6.c:580 sctp_inet6_cmp_addr+0x169/0x1a0 net/sctp/ipv6.c:898 sctp_bind_addr_conflict+0x28c/0x470 net/sctp/bind_addr.c:368 sctp_get_port_local+0x9fc/0x1540 net/sctp/socket.c:7515 sctp_do_bind+0x21c/0x5f0 net/sctp/socket.c:435 sctp_bindx_add+0x90/0x1a0 net/sctp/socket.c:529 sctp_setsockopt_bindx+0x2ad/0x320 net/sctp/socket.c:1058 sctp_setsockopt+0x12c4/0x7000 net/sctp/socket.c:4227 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3039 __sys_setsockopt+0x1bd/0x390 net/socket.c:1903 __do_sys_setsockopt net/socket.c:1914 [inline] __se_sys_setsockopt net/socket.c:1911 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1911 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455389 RSP: 002b:00007fbe7b893c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fbe7b8946d4 RCX: 0000000000455389 RDX: 0000000000000064 RSI: 0000000000000084 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000000000010 R09: 0000000000000000 R10: 00000000205ba000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000005a3 R14: 00000000006fb7e8 R15: 0000000000000000 Allocated by task 7357: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node+0x47/0x70 mm/slab.c:3689 kmalloc_node include/linux/slab.h:554 [inline] kvmalloc_node+0x6b/0x100 mm/util.c:421 kvmalloc include/linux/mm.h:550 [inline] vmemdup_user+0x2d/0xa0 mm/util.c:186 sctp_setsockopt_bindx+0x5d/0x320 net/sctp/socket.c:1022 sctp_setsockopt+0x12c4/0x7000 net/sctp/socket.c:4227 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3039 __sys_setsockopt+0x1bd/0x390 net/socket.c:1903 __do_sys_setsockopt net/socket.c:1914 [inline] __se_sys_setsockopt net/socket.c:1911 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1911 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 1: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x260 mm/slab.c:3813 kfree_const+0x59/0x70 mm/util.c:38 kobject_cleanup lib/kobject.c:650 [inline] kobject_release lib/kobject.c:673 [inline] kref_put include/linux/kref.h:70 [inline] kobject_put+0x1af/0x280 lib/kobject.c:690 put_device+0x20/0x30 drivers/base/core.c:1940 __scsi_scan_target+0x22d/0xfe0 drivers/scsi/scsi_scan.c:1588 scsi_scan_channel.part.7+0x11f/0x190 drivers/scsi/scsi_scan.c:1657 scsi_scan_channel drivers/scsi/scsi_scan.c:1684 [inline] scsi_scan_host_selected+0x2b9/0x3d0 drivers/scsi/scsi_scan.c:1686 do_scsi_scan_host+0x1ee/0x260 drivers/scsi/scsi_scan.c:1824 scsi_scan_host+0x4a2/0x590 drivers/scsi/scsi_scan.c:1854 virtscsi_probe+0xbe5/0xf04 drivers/scsi/virtio_scsi.c:913 virtio_dev_probe+0x592/0x942 drivers/virtio/virtio.c:245 really_probe drivers/base/dd.c:448 [inline] driver_probe_device+0x69b/0x960 drivers/base/dd.c:590 __driver_attach+0x1b2/0x1f0 drivers/base/dd.c:824 bus_for_each_dev+0x151/0x1d0 drivers/base/bus.c:311 driver_attach+0x3d/0x50 drivers/base/dd.c:843 bus_add_driver+0x4b2/0x600 drivers/base/bus.c:667 driver_register+0x1bf/0x320 drivers/base/driver.c:166 register_virtio_driver+0x79/0xd0 drivers/virtio/virtio.c:296 is_blacklisted_cpu arch/x86/crypto/camellia_glue.c:1473 [inline] init+0xa3/0x114 arch/x86/crypto/camellia_glue.c:1494 do_one_initcall+0x127/0x913 init/main.c:883 do_initcall_level init/main.c:951 [inline] do_initcalls init/main.c:959 [inline] do_basic_setup init/main.c:977 [inline] kernel_init_freeable+0x49b/0x58e init/main.c:1127 kernel_init+0x11/0x1b3 init/main.c:1053 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 The buggy address belongs to the object at ffff8801d0f65740 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 16 bytes inside of 32-byte region [ffff8801d0f65740, ffff8801d0f65760) The buggy address belongs to the page: page:ffffea000743d940 count:1 mapcount:0 mapping:ffff8801d0f65000 index:0xffff8801d0f65fc1 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801d0f65000 ffff8801d0f65fc1 000000010000003f raw: ffffea00074106e0 ffffea0007418220 ffff8801da8001c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d0f65600: 00 00 00 00 fc fc fc fc 00 00 00 fc fc fc fc fc ffff8801d0f65680: 00 00 04 fc fc fc fc fc 00 00 04 fc fc fc fc fc >ffff8801d0f65700: 00 00 04 fc fc fc fc fc 00 00 fc fc fc fc fc fc ^ ffff8801d0f65780: fb fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ffff8801d0f65800: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================