================================================================== BUG: KASAN: slab-out-of-bounds in debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] BUG: KASAN: slab-out-of-bounds in do_raw_spin_lock+0x1c0/0x200 kernel/locking/spinlock_debug.c:112 Read of size 4 at addr ffff8801be4e9f34 by task syz-executor5/22915 CPU: 1 PID: 22915 Comm: syz-executor5 Not tainted 4.18.0-rc6+ #140 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+0x1c9/0x2b4 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_load4_noabort+0x14/0x20 mm/kasan/report.c:432 debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] do_raw_spin_lock+0x1c0/0x200 kernel/locking/spinlock_debug.c:112 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline] _raw_spin_lock_bh+0x39/0x40 kernel/locking/spinlock.c:168 spin_lock_bh include/linux/spinlock.h:315 [inline] sock_hash_ctx_update_elem.isra.26+0xbef/0x14d0 kernel/bpf/sockmap.c:2378 sock_hash_update_elem+0x1e2/0x510 kernel/bpf/sockmap.c:2425 map_update_elem+0x72d/0xcb0 kernel/bpf/syscall.c:741 __do_sys_bpf kernel/bpf/syscall.c:2298 [inline] __se_sys_bpf kernel/bpf/syscall.c:2269 [inline] __x64_sys_bpf+0x32d/0x510 kernel/bpf/syscall.c:2269 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x456919 Code: fd b4 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 cb b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f95eb71cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f95eb71d6d4 RCX: 0000000000456919 RDX: 0000000000000020 RSI: 0000000020000180 RDI: 0000000000000002 RBP: 000000000072be80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004ca390 R14: 00000000004c2323 R15: 0000000000000000 Allocated by task 22915: 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 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3554 kmem_cache_zalloc include/linux/slab.h:697 [inline] kcm_attach net/kcm/kcmsock.c:1405 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1490 [inline] kcm_ioctl+0xd10/0x1930 net/kcm/kcmsock.c:1696 sock_do_ioctl+0xe4/0x3e0 net/socket.c:969 sock_ioctl+0x30d/0x680 net/socket.c:1093 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x1de/0x1720 fs/ioctl.c:684 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701 __do_sys_ioctl fs/ioctl.c:708 [inline] __se_sys_ioctl fs/ioctl.c:706 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:706 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8801be4e9d00 which belongs to the cache kcm_psock_cache of size 544 The buggy address is located 20 bytes to the right of 544-byte region [ffff8801be4e9d00, ffff8801be4e9f20) The buggy address belongs to the page: page:ffffea0006f93a00 count:1 mapcount:0 mapping:ffff8801cde84640 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801cdf16148 ffff8801cdf16148 ffff8801cde84640 raw: 0000000000000000 ffff8801be4e8180 000000010000000b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801be4e9e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801be4e9e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8801be4e9f00: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801be4e9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801be4ea000: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================