RSP: 002b:00007f8e82da2c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f8e82da2c90 RCX: 0000000000457f29
RDX: 00000000fffffefd RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 000000000073bfa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8e82da36d4
R13: 00000000004c6ed7 R14: 00000000004dc798 R15: 0000000000000004
==================================================================
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 ffff888091390780 by task syz-executor.1/524
CPU: 1 PID: 524 Comm: syz-executor.1 Not tainted 5.0.0+ #17
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]
__x64_sys_write+0x73/0xb0 fs/read_write.c:607
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x457f29
Code: ad b8 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 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f8e82da2c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f8e82da2c90 RCX: 0000000000457f29
RDX: 00000000fffffefd RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 000000000073bfa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8e82da36d4
R13: 00000000004c6ed7 R14: 00000000004dc798 R15: 0000000000000004
Allocated by task 524:
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:604 [inline]
kvzalloc include/linux/mm.h:612 [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]
__x64_sys_write+0x73/0xb0 fs/read_write.c:607
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 7696:
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
kvfree+0x61/0x70 mm/util.c:459
__vunmap+0x345/0x450 mm/vmalloc.c:1540
__vfree+0x41/0xd0 mm/vmalloc.c:1584
vfree+0x5f/0x90 mm/vmalloc.c:1614
copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:886 [inline]
get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline]
do_ip6t_get_ctl+0x74a/0x960 net/ipv6/netfilter/ip6_tables.c:1712
nf_sockopt net/netfilter/nf_sockopt.c:104 [inline]
nf_getsockopt+0x80/0xe0 net/netfilter/nf_sockopt.c:122
ipv6_getsockopt net/ipv6/ipv6_sockglue.c:1402 [inline]
ipv6_getsockopt+0x20b/0x290 net/ipv6/ipv6_sockglue.c:1382
tcp_getsockopt net/ipv4/tcp.c:3631 [inline]
tcp_getsockopt+0x95/0xf0 net/ipv4/tcp.c:3625
sock_common_getsockopt+0x9a/0xe0 net/core/sock.c:3079
__sys_getsockopt+0x168/0x250 net/socket.c:1960
__do_sys_getsockopt net/socket.c:1971 [inline]
__se_sys_getsockopt net/socket.c:1968 [inline]
__x64_sys_getsockopt+0xbe/0x150 net/socket.c:1968
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
The buggy address belongs to the object at ffff888091390780
which belongs to the cache kmalloc-32 of size 32
The buggy address is located 0 bytes inside of
32-byte region [ffff888091390780, ffff8880913907a0)
The buggy address belongs to the page:
page:ffffea000244e400 count:1 mapcount:0 mapping:ffff88812c3f01c0 index:0xffff888091390fc1
flags: 0x1fffc0000000200(slab)
raw: 01fffc0000000200 ffffea0002a46588 ffffea0002a2d788 ffff88812c3f01c0
raw: ffff888091390fc1 ffff888091390000 000000010000003f 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff888091390680: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
ffff888091390700: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
>ffff888091390780: 00 00 00 00 fc fc fc fc fb fb fb fb fc fc fc fc
^
ffff888091390800: 00 00 fc fc fc fc fc fc fb fb fb fb fc fc fc fc
ffff888091390880: fb fb fb fb fc fc fc fc 00 fc fc fc fc fc fc fc
==================================================================