================================================================== BUG: KASAN: slab-out-of-bounds in instrument_atomic_read include/linux/instrumented.h:71 [inline] BUG: KASAN: slab-out-of-bounds in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] BUG: KASAN: slab-out-of-bounds in refcount_read include/linux/refcount.h:147 [inline] BUG: KASAN: slab-out-of-bounds in __refcount_add_not_zero include/linux/refcount.h:152 [inline] BUG: KASAN: slab-out-of-bounds in __refcount_inc_not_zero include/linux/refcount.h:227 [inline] BUG: KASAN: slab-out-of-bounds in refcount_inc_not_zero include/linux/refcount.h:245 [inline] BUG: KASAN: slab-out-of-bounds in sk_psock_get+0xe4/0x2c0 include/linux/skmsg.h:449 Read of size 4 at addr ffff88801b5b02b8 by task syz-executor.2/9048 CPU: 1 PID: 9048 Comm: syz-executor.2 Not tainted 5.15.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 instrument_atomic_read include/linux/instrumented.h:71 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline] refcount_read include/linux/refcount.h:147 [inline] __refcount_add_not_zero include/linux/refcount.h:152 [inline] __refcount_inc_not_zero include/linux/refcount.h:227 [inline] refcount_inc_not_zero include/linux/refcount.h:245 [inline] sk_psock_get+0xe4/0x2c0 include/linux/skmsg.h:449 tls_sw_recvmsg+0x159/0x1330 net/tls/tls_sw.c:1761 inet_recvmsg+0xf2/0x490 net/ipv4/af_inet.c:852 sock_recvmsg_nosec net/socket.c:944 [inline] sock_recvmsg net/socket.c:962 [inline] sock_recvmsg net/socket.c:958 [inline] ____sys_recvmsg+0x25e/0x620 net/socket.c:2628 ___sys_recvmsg+0xe2/0x1a0 net/socket.c:2670 do_recvmmsg+0x1c8/0x550 net/socket.c:2764 __sys_recvmmsg net/socket.c:2843 [inline] __do_sys_recvmmsg net/socket.c:2866 [inline] __se_sys_recvmmsg net/socket.c:2859 [inline] __x64_sys_recvmmsg+0x19a/0x200 net/socket.c:2859 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f2fff27e739 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2ffe9f5188 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f2fff382f80 RCX: 00007f2fff27e739 RDX: 000000000000000a RSI: 00000000200030c0 RDI: 0000000000000005 RBP: 00007f2fff2d8cc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000010000 R11: 0000000000000246 R12: 00007f2fff382f80 R13: 00007ffcc0fc82df R14: 00007f2ffe9f5300 R15: 0000000000022000 Allocated by task 9048: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x83/0xb0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3214 [inline] kmem_cache_alloc+0x209/0x390 mm/slub.c:3219 kmem_cache_zalloc include/linux/slab.h:711 [inline] kcm_attach net/kcm/kcmsock.c:1404 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1489 [inline] kcm_ioctl+0x3d2/0x10b0 net/kcm/kcmsock.c:1695 sock_do_ioctl+0xc9/0x1c0 net/socket.c:1118 sock_ioctl+0x278/0x510 net/socket.c:1235 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x11f/0x190 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe9/0x110 mm/kasan/generic.c:348 insert_work+0x42/0x300 kernel/workqueue.c:1353 __queue_work+0x4a5/0xc80 kernel/workqueue.c:1519 queue_work_on+0x70/0x80 kernel/workqueue.c:1546 kcm_attach net/kcm/kcmsock.c:1465 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1489 [inline] kcm_ioctl+0xc79/0x10b0 net/kcm/kcmsock.c:1695 sock_do_ioctl+0xc9/0x1c0 net/socket.c:1118 sock_ioctl+0x278/0x510 net/socket.c:1235 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x11f/0x190 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff88801b5b0000 which belongs to the cache kcm_psock_cache of size 568 The buggy address is located 128 bytes to the right of 568-byte region [ffff88801b5b0000, ffff88801b5b0238) The buggy address belongs to the page: page:ffffea00006d6c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1b5b0 head:ffffea00006d6c00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888024a67000 raw: 0000000000000000 0000000080170017 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 9048, ts 63781951510, free_ts 46843235098 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0xa6f/0x2f50 mm/page_alloc.c:4153 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5375 alloc_slab_page mm/slub.c:1763 [inline] allocate_slab mm/slub.c:1900 [inline] new_slab+0x319/0x490 mm/slub.c:1963 ___slab_alloc+0x923/0xfe0 mm/slub.c:2994 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3081 slab_alloc_node mm/slub.c:3172 [inline] slab_alloc mm/slub.c:3214 [inline] kmem_cache_alloc+0x365/0x390 mm/slub.c:3219 kmem_cache_zalloc include/linux/slab.h:711 [inline] kcm_attach net/kcm/kcmsock.c:1404 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1489 [inline] kcm_ioctl+0x3d2/0x10b0 net/kcm/kcmsock.c:1695 sock_do_ioctl+0xc9/0x1c0 net/socket.c:1118 sock_ioctl+0x278/0x510 net/socket.c:1235 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x11f/0x190 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x2c5/0x780 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3315 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3394 put_page include/linux/mm.h:1247 [inline] __skb_frag_unref include/linux/skbuff.h:3107 [inline] skb_release_data+0x3ab/0x640 net/core/skbuff.c:671 skb_release_all net/core/skbuff.c:741 [inline] __kfree_skb+0x39/0x50 net/core/skbuff.c:755 sk_eat_skb include/net/sock.h:2629 [inline] tcp_recvmsg_locked+0xe65/0x2080 net/ipv4/tcp.c:2506 tcp_recvmsg+0x103/0x430 net/ipv4/tcp.c:2552 inet_recvmsg+0xf2/0x490 net/ipv4/af_inet.c:852 sock_recvmsg_nosec net/socket.c:944 [inline] sock_recvmsg net/socket.c:962 [inline] sock_recvmsg net/socket.c:958 [inline] sock_read_iter+0x2b4/0x3f0 net/socket.c:1035 call_read_iter include/linux/fs.h:2157 [inline] new_sync_read+0x4a5/0x5f0 fs/read_write.c:404 vfs_read+0x265/0x4c0 fs/read_write.c:485 ksys_read+0x171/0x1d0 fs/read_write.c:623 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff88801b5b0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801b5b0200: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc >ffff88801b5b0280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88801b5b0300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801b5b0380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================