RDX: 0000000000000030 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:352 [inline] BUG: KASAN: slab-out-of-bounds in default_write_copy_kernel+0xdc/0x130 sound/core/pcm_lib.c:1946 Read of size 64 at addr ffff8880a905c0c0 by task syz-executor.3/6229 CPU: 0 PID: 6229 Comm: syz-executor.3 Not tainted 5.1.0-rc2 #36 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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x123/0x190 mm/kasan/generic.c:191 memcpy+0x24/0x50 mm/kasan/common.c:132 memcpy include/linux/string.h:352 [inline] default_write_copy_kernel+0xdc/0x130 sound/core/pcm_lib.c:1946 interleaved_copy+0xd0/0x100 sound/core/pcm_lib.c:2007 __snd_pcm_lib_xfer+0xea3/0x1cfa sound/core/pcm_lib.c:2225 snd_pcm_oss_write3+0xee/0x230 sound/core/oss/pcm_oss.c:1237 io_playback_transfer+0x280/0x330 sound/core/oss/io.c:47 snd_pcm_plug_write_transfer+0x30c/0x400 sound/core/oss/pcm_plugin.c:620 snd_pcm_oss_write2+0x250/0x410 sound/core/oss/pcm_oss.c:1366 snd_pcm_oss_write1 sound/core/oss/pcm_oss.c:1432 [inline] snd_pcm_oss_write+0x6c2/0x8f0 sound/core/oss/pcm_oss.c:2774 __vfs_write+0x8d/0x110 fs/read_write.c:485 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0xea/0x1f0 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __ia32_sys_write+0x71/0xb0 fs/read_write.c:607 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x281/0xc98 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f31869 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 14 24 c3 8b 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5d2d0cc EFLAGS: 00000296 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00000000200000c0 RDX: 0000000000000030 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 6229: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_kmalloc mm/kasan/common.c:497 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:511 __do_kmalloc_node mm/slab.c:3686 [inline] __kmalloc_node+0x4e/0x70 mm/slab.c:3693 kmalloc_node include/linux/slab.h:588 [inline] kvmalloc_node+0x68/0x100 mm/util.c:430 kvmalloc include/linux/mm.h:605 [inline] kvzalloc include/linux/mm.h:613 [inline] snd_pcm_plugin_alloc+0x585/0x770 sound/core/oss/pcm_plugin.c:70 snd_pcm_plug_alloc+0x212/0x330 sound/core/oss/pcm_plugin.c:117 snd_pcm_oss_change_params_locked+0x2118/0x3750 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_write1 sound/core/oss/pcm_oss.c:1397 [inline] snd_pcm_oss_write+0x42b/0x8f0 sound/core/oss/pcm_oss.c:2774 __vfs_write+0x8d/0x110 fs/read_write.c:485 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0xea/0x1f0 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __ia32_sys_write+0x71/0xb0 fs/read_write.c:607 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x281/0xc98 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 4960: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:459 kasan_slab_free+0xe/0x10 mm/kasan/common.c:467 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3821 apparmor_sk_free_security+0xd9/0x120 security/apparmor/lsm.c:786 security_sk_free+0x47/0x90 security/security.c:2024 sk_prot_free net/core/sock.c:1640 [inline] __sk_destruct+0x4a1/0x6d0 net/core/sock.c:1726 sk_destruct+0x7b/0x90 net/core/sock.c:1734 __sk_free+0xce/0x300 net/core/sock.c:1745 sk_free+0x42/0x50 net/core/sock.c:1756 sock_put include/net/sock.h:1708 [inline] tcp_close+0xbc3/0x10c0 net/ipv4/tcp.c:2516 inet_release+0x105/0x1f0 net/ipv4/af_inet.c:428 inet6_release+0x53/0x80 net/ipv6/af_inet6.c:473 __sock_release+0xd3/0x2b0 net/socket.c:579 sock_close+0x1b/0x30 net/socket.c:1162 __fput+0x2e5/0x8d0 fs/file_table.c:278 ____fput+0x16/0x20 fs/file_table.c:309 task_work_run+0x14a/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x273/0x2c0 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_32_irqs_on arch/x86/entry/common.c:341 [inline] do_fast_syscall_32+0xa9d/0xc98 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 The buggy address belongs to the object at ffff8880a905c0c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880a905c0c0, ffff8880a905c0e0) The buggy address belongs to the page: page:ffffea0002a41700 count:1 mapcount:0 mapping:ffff88812c3f01c0 index:0xffff8880a905cfc1 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00027e00c8 ffffea0002278cc8 ffff88812c3f01c0 raw: ffff8880a905cfc1 ffff8880a905c000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a905bf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a905c000: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880a905c080: fb fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ^ ffff8880a905c100: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a905c180: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================