RDX: 0000000000000001 RSI: 0000000020001640 RDI: 0000000000000003 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f48417de6d4 R13: 00000000004c37f6 R14: 00000000004d5ca8 R15: 0000000000000004 ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:352 [inline] BUG: KASAN: slab-out-of-bounds in default_read_copy_kernel+0xe1/0x140 sound/core/pcm_lib.c:1988 Write of size 64 at addr ffff8881d7f8c0c0 by task syz-executor4/15210 CPU: 0 PID: 15210 Comm: syz-executor4 Not tainted 4.20.0-rc5+ #365 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+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 memcpy+0x37/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:352 [inline] default_read_copy_kernel+0xe1/0x140 sound/core/pcm_lib.c:1988 interleaved_copy+0xd1/0x110 sound/core/pcm_lib.c:2007 __snd_pcm_lib_xfer+0x115f/0x1f23 sound/core/pcm_lib.c:2227 snd_pcm_oss_read3+0x1c8/0x410 sound/core/oss/pcm_oss.c:1274 io_capture_transfer+0x27d/0x310 sound/core/oss/io.c:73 snd_pcm_plug_read_transfer+0x1d7/0x3b0 sound/core/oss/pcm_plugin.c:651 snd_pcm_oss_read2+0x221/0x450 sound/core/oss/pcm_oss.c:1474 snd_pcm_oss_read1 sound/core/oss/pcm_oss.c:1531 [inline] snd_pcm_oss_read+0x638/0x830 sound/core/oss/pcm_oss.c:2752 do_loop_readv_writev fs/read_write.c:700 [inline] do_iter_read+0x4a3/0x650 fs/read_write.c:924 vfs_readv+0x175/0x1c0 fs/read_write.c:986 do_readv+0x11a/0x310 fs/read_write.c:1019 __do_sys_readv fs/read_write.c:1106 [inline] __se_sys_readv fs/read_write.c:1103 [inline] __x64_sys_readv+0x75/0xb0 fs/read_write.c:1103 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457569 Code: fd b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f48417ddc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000013 RAX: ffffffffffffffda RBX: 00007f48417ddc90 RCX: 0000000000457569 RDX: 0000000000000001 RSI: 0000000020001640 RDI: 0000000000000003 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f48417de6d4 R13: 00000000004c37f6 R14: 00000000004d5ca8 R15: 0000000000000004 Allocated by task 15210: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc_node mm/slab.c:3684 [inline] __kmalloc_node+0x50/0x70 mm/slab.c:3691 kmalloc_node include/linux/slab.h:589 [inline] kvmalloc_node+0x65/0xf0 mm/util.c:416 kvmalloc include/linux/mm.h:577 [inline] kvzalloc include/linux/mm.h:585 [inline] snd_pcm_plugin_alloc+0x577/0x770 sound/core/oss/pcm_plugin.c:70 snd_pcm_plug_alloc+0x149/0x340 sound/core/oss/pcm_plugin.c:129 snd_pcm_oss_change_params_locked+0x2209/0x3c60 sound/core/oss/pcm_oss.c:1038 snd_pcm_oss_make_ready_locked+0xbc/0x130 sound/core/oss/pcm_oss.c:1183 snd_pcm_oss_read1 sound/core/oss/pcm_oss.c:1507 [inline] snd_pcm_oss_read+0x417/0x830 sound/core/oss/pcm_oss.c:2752 do_loop_readv_writev fs/read_write.c:700 [inline] do_iter_read+0x4a3/0x650 fs/read_write.c:924 vfs_readv+0x175/0x1c0 fs/read_write.c:986 do_readv+0x11a/0x310 fs/read_write.c:1019 __do_sys_readv fs/read_write.c:1106 [inline] __se_sys_readv fs/read_write.c:1103 [inline] __x64_sys_readv+0x75/0xb0 fs/read_write.c:1103 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 6070: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 apparmor_sk_free_security+0xdd/0x120 security/apparmor/lsm.c:790 security_sk_free+0x4a/0x80 security/security.c:1482 sk_prot_free net/core/sock.c:1502 [inline] __sk_destruct+0x713/0xa80 net/core/sock.c:1588 sk_destruct+0x78/0x90 net/core/sock.c:1596 __sk_free+0xcf/0x300 net/core/sock.c:1607 sk_free+0x42/0x50 net/core/sock.c:1618 sock_put include/net/sock.h:1693 [inline] tcp_close+0xcc1/0x11d0 net/ipv4/tcp.c:2492 inet_release+0x104/0x1f0 net/ipv4/af_inet.c:428 __sock_release+0xd7/0x250 net/socket.c:579 sock_close+0x19/0x20 net/socket.c:1141 __fput+0x385/0xa30 fs/file_table.c:278 ____fput+0x15/0x20 fs/file_table.c:309 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8881d7f8c0c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8881d7f8c0c0, ffff8881d7f8c0e0) The buggy address belongs to the page: page:ffffea00075fe300 count:1 mapcount:0 mapping:ffff8881da8001c0 index:0xffff8881d7f8cfc1 flags: 0x2fffc0000000200(slab) raw: 02fffc0000000200 ffffea0007633088 ffffea00076191c8 ffff8881da8001c0 raw: ffff8881d7f8cfc1 ffff8881d7f8c000 0000000100000033 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d7f8bf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881d7f8c000: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8881d7f8c080: fb fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ^ ffff8881d7f8c100: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8881d7f8c180: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================