================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:178 [inline] BUG: KASAN: use-after-free in atomic64_read arch/x86/include/asm/atomic64_64.h:22 [inline] BUG: KASAN: use-after-free in atomic_long_read include/asm-generic/atomic-long.h:45 [inline] BUG: KASAN: use-after-free in get_work_pool+0x1c2/0x1e0 kernel/workqueue.c:710 Read of size 8 at addr ffff8801ca074f60 by task syz-executor6/1720 CPU: 0 PID: 1720 Comm: syz-executor6 Not tainted 4.14.0+ #125 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 __read_once_size include/linux/compiler.h:178 [inline] atomic64_read arch/x86/include/asm/atomic64_64.h:22 [inline] atomic_long_read include/asm-generic/atomic-long.h:45 [inline] get_work_pool+0x1c2/0x1e0 kernel/workqueue.c:710 __queue_work+0x278/0x1220 kernel/workqueue.c:1402 queue_work_on+0x16a/0x1c0 kernel/workqueue.c:1487 queue_work include/linux/workqueue.h:491 [inline] strp_check_rcv+0x25/0x30 net/strparser/strparser.c:552 kcm_attach net/kcm/kcmsock.c:1439 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1460 [inline] kcm_ioctl+0x826/0x1610 net/kcm/kcmsock.c:1695 sock_do_ioctl+0x65/0xb0 net/socket.c:961 sock_ioctl+0x2c2/0x440 net/socket.c:1058 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452879 RSP: 002b:00007fb3b0d2abe8 EFLAGS: 00000212 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452879 RDX: 0000000020a9e000 RSI: 00000000000089e0 RDI: 0000000000000021 RBP: 0000000000000082 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 0000000000000000 R13: 0000000000a6f7ff R14: 00007fb3b0d2b9c0 R15: 0000000000000000 Allocated by task 1720: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3562 kmem_cache_zalloc include/linux/slab.h:657 [inline] kcm_attach net/kcm/kcmsock.c:1394 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1460 [inline] kcm_ioctl+0x2d1/0x1610 net/kcm/kcmsock.c:1695 sock_do_ioctl+0x65/0xb0 net/socket.c:961 sock_ioctl+0x2c2/0x440 net/socket.c:1058 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x1f/0x96 Freed by task 1730: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3504 [inline] kmem_cache_free+0x77/0x280 mm/slab.c:3764 kcm_unattach+0xe53/0x1510 net/kcm/kcmsock.c:1563 kcm_unattach_ioctl net/kcm/kcmsock.c:1608 [inline] kcm_ioctl+0xdf0/0x1610 net/kcm/kcmsock.c:1705 sock_do_ioctl+0x65/0xb0 net/socket.c:961 sock_ioctl+0x2c2/0x440 net/socket.c:1058 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x1f/0x96 The buggy address belongs to the object at ffff8801ca074e80 which belongs to the cache kcm_psock_cache of size 576 The buggy address is located 224 bytes inside of 576-byte region [ffff8801ca074e80, ffff8801ca0750c0) The buggy address belongs to the page: page:ffffea0007281d00 count:1 mapcount:0 mapping:ffff8801ca0740c0 index:0xffff8801ca075c40 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801ca0740c0 ffff8801ca075c40 0000000100000002 raw: ffffea0007284fa0 ffff8801d2b75240 ffff8801d2915800 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801ca074e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801ca074e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801ca074f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801ca074f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801ca075000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================