================================================================== 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:439 Read of size 4 at addr ffff888077cac2b8 by task syz-executor.0/4084 CPU: 1 PID: 4084 Comm: syz-executor.0 Not tainted 5.18.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+0xeb/0x495 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 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:439 tls_sw_recvmsg+0x159/0x1270 net/tls/tls_sw.c:1783 inet6_recvmsg+0xf2/0x490 net/ipv6/af_inet6.c:671 sock_recvmsg_nosec net/socket.c:948 [inline] sock_recvmsg net/socket.c:966 [inline] sock_recvmsg net/socket.c:962 [inline] ____sys_recvmsg+0x258/0x620 net/socket.c:2632 ___sys_recvmsg+0xe2/0x1a0 net/socket.c:2674 do_recvmmsg+0x1c8/0x550 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+0x19a/0x200 net/socket.c:2863 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f2830289049 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2831424168 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f283039bf60 RCX: 00007f2830289049 RDX: 000000000000000a RSI: 00000000200030c0 RDI: 0000000000000005 RBP: 00007f28302e308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000010000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd9d2145df R14: 00007f2831424300 R15: 0000000000022000 Allocated by task 4084: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] __kasan_slab_alloc+0x90/0xc0 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+0x204/0x3b0 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+0x3d2/0x10b0 net/kcm/kcmsock.c:1696 sock_do_ioctl+0xc9/0x1c0 net/socket.c:1122 sock_ioctl+0x278/0x510 net/socket.c:1239 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x11f/0x190 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Last potentially related work creation: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 __kasan_record_aux_stack+0xbe/0xd0 mm/kasan/generic.c:348 insert_work+0x43/0x2e0 kernel/workqueue.c:1358 __queue_work+0x4e4/0xdc0 kernel/workqueue.c:1517 queue_work_on+0x70/0x80 kernel/workqueue.c:1545 kcm_attach net/kcm/kcmsock.c:1466 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1490 [inline] kcm_ioctl+0xc79/0x10b0 net/kcm/kcmsock.c:1696 sock_do_ioctl+0xc9/0x1c0 net/socket.c:1122 sock_ioctl+0x278/0x510 net/socket.c:1239 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x11f/0x190 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888077cac000 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 [ffff888077cac000, ffff888077cac238) The buggy address belongs to the physical page: page:ffffea0001df2b00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x77cac head:ffffea0001df2b00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff88814c14a780 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4084, tgid 4083 (syz-executor.0), ts 69424836196, free_ts 69409035104 prep_new_page mm/page_alloc.c:2441 [inline] get_page_from_freelist+0x178d/0x3dc0 mm/page_alloc.c:4182 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5408 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab+0x26c/0x3c0 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0x8e1/0xf20 mm/slub.c:3005 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3092 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+0x360/0x3b0 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+0x3d2/0x10b0 net/kcm/kcmsock.c:1696 sock_do_ioctl+0xc9/0x1c0 net/socket.c:1122 sock_ioctl+0x278/0x510 net/socket.c:1239 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x11f/0x190 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0x80 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+0x549/0xd20 mm/page_alloc.c:1406 free_unref_page_prepare mm/page_alloc.c:3328 [inline] free_unref_page+0x19/0x6a0 mm/page_alloc.c:3423 __stack_depot_save+0x168/0x500 lib/stackdepot.c:427 kasan_save_stack+0x2e/0x40 mm/kasan/common.c:39 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] ____kasan_kmalloc mm/kasan/common.c:515 [inline] ____kasan_kmalloc mm/kasan/common.c:474 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:524 kmalloc include/linux/slab.h:581 [inline] call_modprobe kernel/kmod.c:79 [inline] __request_module+0x21e/0x750 kernel/kmod.c:170 crypto_larval_lookup crypto/api.c:289 [inline] crypto_alg_mod_lookup+0x27c/0x360 crypto/api.c:332 crypto_find_alg crypto/api.c:545 [inline] crypto_alloc_tfm_node+0xc8/0x1d0 crypto/api.c:582 cryptd_alloc_aead+0xdb/0x1b0 crypto/cryptd.c:1023 simd_aead_init+0x60/0x180 crypto/simd.c:370 crypto_create_tfm_node+0x103/0x2d0 crypto/api.c:512 crypto_alloc_tfm_node+0xe3/0x1d0 crypto/api.c:588 tls_set_sw_offload+0xe37/0x13c0 net/tls/tls_sw.c:2542 do_tls_setsockopt_conf net/tls/tls_main.c:652 [inline] do_tls_setsockopt net/tls/tls_main.c:687 [inline] tls_setsockopt+0x99e/0xea0 net/tls/tls_main.c:707 __sys_setsockopt+0x198/0x4f0 net/socket.c:2180 __do_sys_setsockopt net/socket.c:2191 [inline] __se_sys_setsockopt net/socket.c:2188 [inline] __x64_sys_setsockopt+0xb5/0x150 net/socket.c:2188 Memory state around the buggy address: ffff888077cac180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888077cac200: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc >ffff888077cac280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888077cac300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888077cac380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================