================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: use-after-free in atomic_fetch_add_relaxed include/asm-generic/atomic-instrumented.h:142 [inline] BUG: KASAN: use-after-free in __refcount_add include/linux/refcount.h:193 [inline] BUG: KASAN: use-after-free in __refcount_inc include/linux/refcount.h:250 [inline] BUG: KASAN: use-after-free in refcount_inc include/linux/refcount.h:267 [inline] BUG: KASAN: use-after-free in sock_hold include/net/sock.h:698 [inline] BUG: KASAN: use-after-free in nr_release+0x62/0x450 net/netrom/af_netrom.c:520 Write of size 4 at addr ffff8880251d3080 by task syz-executor.2/13426 CPU: 1 PID: 13426 Comm: syz-executor.2 Not tainted 5.10.0-rc7-syzkaller #0 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+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:192 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_fetch_add_relaxed include/asm-generic/atomic-instrumented.h:142 [inline] __refcount_add include/linux/refcount.h:193 [inline] __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] sock_hold include/net/sock.h:698 [inline] nr_release+0x62/0x450 net/netrom/af_netrom.c:520 __sock_release+0xcd/0x280 net/socket.c:596 sock_close+0x18/0x20 net/socket.c:1255 __fput+0x285/0x920 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:151 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:164 [inline] exit_to_user_mode_prepare+0x17e/0x1a0 kernel/entry/common.c:191 syscall_exit_to_user_mode+0x38/0x260 kernel/entry/common.c:266 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x417ab1 Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 a4 1a 00 00 c3 48 83 ec 08 e8 0a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 53 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007ffda0fa55d0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000417ab1 RDX: 0000000000000000 RSI: ffffffff88ebd601 RDI: 0000000000000004 RBP: 0000000000000001 R08: ffffffff8130c3f4 R09: 000000008ccce074 R10: 00007ffda0fa56b0 R11: 0000000000000293 R12: 000000000119ca00 R13: 000000000119ca00 R14: 00000000000003e8 R15: 000000000119c184 Allocated by task 13434: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 kmalloc include/linux/slab.h:557 [inline] sk_prot_alloc+0x17a/0x300 net/core/sock.c:1685 sk_alloc+0x32/0xbd0 net/core/sock.c:1739 nr_create+0xb2/0x5f0 net/netrom/af_netrom.c:433 __sock_create+0x3de/0x780 net/socket.c:1405 sock_create net/socket.c:1456 [inline] __sys_socket+0xef/0x200 net/socket.c:1498 __do_sys_socket net/socket.c:1507 [inline] __se_sys_socket net/socket.c:1505 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1505 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 13426: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x102/0x140 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1544 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1577 slab_free mm/slub.c:3142 [inline] kfree+0xdb/0x360 mm/slub.c:4124 sk_prot_free net/core/sock.c:1722 [inline] __sk_destruct+0x6c0/0x8f0 net/core/sock.c:1807 sk_destruct+0xbd/0xe0 net/core/sock.c:1822 __sk_free+0xef/0x3d0 net/core/sock.c:1833 sk_free+0x78/0xa0 net/core/sock.c:1844 sock_put include/net/sock.h:1799 [inline] nr_release+0x39a/0x450 net/netrom/af_netrom.c:554 __sock_release+0xcd/0x280 net/socket.c:596 sock_close+0x18/0x20 net/socket.c:1255 __fput+0x285/0x920 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:151 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:164 [inline] exit_to_user_mode_prepare+0x17e/0x1a0 kernel/entry/common.c:191 syscall_exit_to_user_mode+0x38/0x260 kernel/entry/common.c:266 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880251d3000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 128 bytes inside of 2048-byte region [ffff8880251d3000, ffff8880251d3800) The buggy address belongs to the page: page:00000000e2c922ea refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x251d0 head:00000000e2c922ea order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 0000000000000000 0000000200000001 ffff888010042000 raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880251d2f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880251d3000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880251d3080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880251d3100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880251d3180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================