================================================================== 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+0x150/0x470 include/linux/skmsg.h:439 Read of size 4 at addr ffff8880193b02b8 by task syz-executor272/3594 CPU: 0 PID: 3594 Comm: syz-executor272 Tainted: G W 5.17.0-syzkaller-13430-g787af64d05cd #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+0x1dc/0x2d8 lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:313 print_report+0xf4/0x200 mm/kasan/report.c:429 kasan_report+0x109/0x140 mm/kasan/report.c:491 kasan_check_range+0x2b5/0x2f0 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+0x150/0x470 include/linux/skmsg.h:439 tls_sw_recvmsg+0x1f5/0x1f00 net/tls/tls_sw.c:1783 inet6_recvmsg+0x156/0x270 net/ipv6/af_inet6.c:671 sock_recvmsg_nosec net/socket.c:948 [inline] sock_recvmsg net/socket.c:966 [inline] ____sys_recvmsg+0x2b0/0x5e0 net/socket.c:2632 ___sys_recvmsg net/socket.c:2674 [inline] do_recvmmsg+0x6e4/0x1680 net/socket.c:2768 __sys_recvmmsg net/socket.c:2847 [inline] __do_sys_recvmmsg net/socket.c:2870 [inline] __se_sys_recvmmsg net/socket.c:2863 [inline] __x64_sys_recvmmsg+0x195/0x240 net/socket.c:2863 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x50 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f4a17e1c6a9 Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fffa33e2338 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4a17e1c6a9 RDX: 000000000000000a RSI: 00000000200030c0 RDI: 0000000000000005 RBP: 00007f4a17de0690 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000010000 R11: 0000000000000246 R12: 00007f4a17de0720 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 3594: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] __kasan_slab_alloc+0xb2/0xe0 mm/kasan/common.c:469 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:749 [inline] slab_alloc_node mm/slub.c:3217 [inline] slab_alloc mm/slub.c:3225 [inline] __kmem_cache_alloc_lru mm/slub.c:3232 [inline] kmem_cache_alloc+0x1c9/0x310 mm/slub.c:3242 kmem_cache_zalloc include/linux/slab.h:704 [inline] kcm_attach net/kcm/kcmsock.c:1405 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1490 [inline] kcm_ioctl+0xaeb/0x1920 net/kcm/kcmsock.c:1696 sock_do_ioctl+0x151/0x3b0 net/socket.c:1122 sock_ioctl+0x4a8/0x7f0 net/socket.c:1239 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x50 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:348 insert_work+0x54/0x3e0 kernel/workqueue.c:1358 __queue_work+0x97a/0xcc0 kernel/workqueue.c:1517 queue_work_on+0x12b/0x220 kernel/workqueue.c:1545 kcm_attach net/kcm/kcmsock.c:1466 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1490 [inline] kcm_ioctl+0x14ae/0x1920 net/kcm/kcmsock.c:1696 sock_do_ioctl+0x151/0x3b0 net/socket.c:1122 sock_ioctl+0x4a8/0x7f0 net/socket.c:1239 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x50 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff8880193b0000 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 [ffff8880193b0000, ffff8880193b0238) The buggy address belongs to the physical page: page:ffffea000064ec00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x193b0 head:ffffea000064ec00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff88814bfcd640 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 3594, tgid 3594 (syz-executor272), ts 35928717197, free_ts 32953184143 prep_new_page mm/page_alloc.c:2441 [inline] get_page_from_freelist+0x708/0xa80 mm/page_alloc.c:4182 __alloc_pages+0x255/0x580 mm/page_alloc.c:5408 alloc_slab_page+0x70/0xf0 mm/slub.c:1799 allocate_slab+0x5d/0x380 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0x40e/0xcc0 mm/slub.c:3005 __slab_alloc mm/slub.c:3092 [inline] slab_alloc_node mm/slub.c:3183 [inline] slab_alloc mm/slub.c:3225 [inline] __kmem_cache_alloc_lru mm/slub.c:3232 [inline] kmem_cache_alloc+0x276/0x310 mm/slub.c:3242 kmem_cache_zalloc include/linux/slab.h:704 [inline] kcm_attach net/kcm/kcmsock.c:1405 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1490 [inline] kcm_ioctl+0xaeb/0x1920 net/kcm/kcmsock.c:1696 sock_do_ioctl+0x151/0x3b0 net/socket.c:1122 sock_ioctl+0x4a8/0x7f0 net/socket.c:1239 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x50 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:1356 [inline] free_pcp_prepare+0xcfc/0xe70 mm/page_alloc.c:1406 free_unref_page_prepare mm/page_alloc.c:3328 [inline] free_unref_page+0x7d/0x580 mm/page_alloc.c:3423 free_slab mm/slub.c:2043 [inline] discard_slab mm/slub.c:2049 [inline] __unfreeze_partials+0x1ab/0x200 mm/slub.c:2523 put_cpu_partial+0x116/0x180 mm/slub.c:2599 do_slab_free mm/slub.c:3498 [inline] ___cache_free+0x117/0x1c0 mm/slub.c:3517 qlist_free_all mm/kasan/quarantine.c:176 [inline] kasan_quarantine_reduce+0x127/0x190 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:446 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:749 [inline] slab_alloc_node mm/slub.c:3217 [inline] slab_alloc mm/slub.c:3225 [inline] __kmem_cache_alloc_lru mm/slub.c:3232 [inline] kmem_cache_alloc+0x1c9/0x310 mm/slub.c:3242 getname_flags+0xba/0x650 fs/namei.c:138 vfs_fstatat fs/stat.c:254 [inline] __do_sys_newfstatat fs/stat.c:426 [inline] __se_sys_newfstatat+0xd4/0x7a0 fs/stat.c:420 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x50 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff8880193b0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880193b0200: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc >ffff8880193b0280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880193b0300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880193b0380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================