[21593] 0 21593 17585 8092 24 4 0 1000 syz-executor2 Out of memory: Kill process 6967 (syz-executor0) score 1007 or sacrifice child Killed process 6967 (syz-executor0) total-vm:70340kB, anon-rss:1684kB, file-rss:32768kB, shmem-rss:14840kB oom_reaper: reaped process 6967 (syz-executor0), now anon-rss:0kB, file-rss:0kB, shmem-rss:14840kB ================================================================== BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x9a/0xc0 lib/usercopy.c:27 Read of size 603 at addr ffff880147cbfff3 by task syz-executor1/21647 CPU: 0 PID: 21647 Comm: syz-executor1 Not tainted 4.14.78+ #26 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 print_address_description+0x60/0x22b mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.6+0x11b/0x2dd mm/kasan/report.c:409 _copy_to_user+0x9a/0xc0 lib/usercopy.c:27 copy_to_user include/linux/uaccess.h:155 [inline] bpf_test_finish.isra.0+0xc8/0x190 net/bpf/test_run.c:59 bpf_prog_test_run_skb+0x4d0/0x8c0 net/bpf/test_run.c:144 bpf_prog_test_run kernel/bpf/syscall.c:1330 [inline] SYSC_bpf kernel/bpf/syscall.c:1602 [inline] SyS_bpf+0x79d/0x3640 kernel/bpf/syscall.c:1547 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457569 RSP: 002b:00007fc5a9a29c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457569 RDX: 0000000000000028 RSI: 0000000020000180 RDI: 000000000000000a RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc5a9a2a6d4 R13: 00000000004bd892 R14: 00000000004cc468 R15: 00000000ffffffff Allocated by task 21628: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x4f/0xd0 mm/kasan/kasan.c:551 slab_post_alloc_hook mm/slab.h:442 [inline] slab_alloc_node mm/slub.c:2723 [inline] slab_alloc mm/slub.c:2731 [inline] __kmalloc_track_caller+0x104/0x300 mm/slub.c:4288 __kmalloc_reserve.isra.8+0x2f/0xc0 net/core/skbuff.c:137 __alloc_skb+0x105/0x550 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:980 [inline] alloc_skb_with_frags+0xab/0x500 net/core/skbuff.c:5167 sock_alloc_send_pskb+0x55e/0x6e0 net/core/sock.c:2075 unix_stream_sendmsg+0x509/0x840 net/unix/af_unix.c:1878 sock_sendmsg_nosec net/socket.c:645 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:655 sock_write_iter+0x209/0x350 net/socket.c:924 call_write_iter include/linux/fs.h:1782 [inline] new_sync_write fs/read_write.c:471 [inline] __vfs_write+0x417/0x5c0 fs/read_write.c:484 vfs_write+0x17f/0x4d0 fs/read_write.c:546 SYSC_write fs/read_write.c:593 [inline] SyS_write+0xc2/0x1a0 fs/read_write.c:585 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 21627: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xac/0x190 mm/kasan/kasan.c:524 slab_free_hook mm/slub.c:1389 [inline] slab_free_freelist_hook mm/slub.c:1410 [inline] slab_free mm/slub.c:2966 [inline] kfree+0xf5/0x310 mm/slub.c:3897 skb_free_head+0x83/0xa0 net/core/skbuff.c:550 skb_release_data+0x495/0x610 net/core/skbuff.c:570 skb_release_all+0x46/0x60 net/core/skbuff.c:627 __kfree_skb net/core/skbuff.c:641 [inline] consume_skb+0xc1/0x330 net/core/skbuff.c:701 unix_stream_read_generic+0x14be/0x1950 net/unix/af_unix.c:2409 unix_stream_recvmsg+0xa4/0xe0 net/unix/af_unix.c:2467 sock_recvmsg_nosec net/socket.c:818 [inline] sock_recvmsg+0xc0/0x100 net/socket.c:825 SYSC_recvfrom net/socket.c:1814 [inline] SyS_recvfrom+0x1d2/0x310 net/socket.c:1786 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff880147cbe600 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 2547 bytes to the right of 4096-byte region [ffff880147cbe600, ffff880147cbf600) The buggy address belongs to the page: page:ffffea00051f2e00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x4000000000008100(slab|head) raw: 4000000000008100 0000000000000000 0000000000000000 0000000180070007 raw: dead000000000100 dead000000000200 ffff8801da802600 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff880147cbfe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff880147cbff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff880147cbff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff880147cc0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff880147cc0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================