Hello,
syzbot found the following crash on:
HEAD commit: 174651bd Linux 4.19.87
git tree: linux-4.19.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=1565d196e00000
kernel config:
https://syzkaller.appspot.com/x/.config?x=c8b1666d827aa49d
dashboard link:
https://syzkaller.appspot.com/bug?extid=55e7362a9674c6e2bd5e
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=11ea7aeae00000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=1180d1bce00000
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:
[email protected]
IPv6: ADDRCONF(NETDEV_UP): vxcan0: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): vxcan0: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): vxcan1: link becomes ready
8021q: adding VLAN 0 to HW filter on device batadv0
==================================================================
BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:348 [inline]
BUG: KASAN: slab-out-of-bounds in do_convert sound/core/oss/linear.c:48
[inline]
BUG: KASAN: slab-out-of-bounds in convert sound/core/oss/linear.c:81
[inline]
BUG: KASAN: slab-out-of-bounds in linear_transfer
sound/core/oss/linear.c:110 [inline]
BUG: KASAN: slab-out-of-bounds in linear_transfer+0x6de/0x940
sound/core/oss/linear.c:88
Read of size 1 at addr ffff88809920dec0 by task syz-executor661/7542
CPU: 1 PID: 7542 Comm: syz-executor661 Not tainted 4.19.87-syzkaller #0
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+0x197/0x210 lib/dump_stack.c:118
print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report mm/kasan/report.c:412 [inline]
kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x123/0x190 mm/kasan/kasan.c:267
memcpy+0x24/0x50 mm/kasan/kasan.c:302
memcpy include/linux/string.h:348 [inline]
do_convert sound/core/oss/linear.c:48 [inline]
convert sound/core/oss/linear.c:81 [inline]
linear_transfer sound/core/oss/linear.c:110 [inline]
linear_transfer+0x6de/0x940 sound/core/oss/linear.c:88
snd_pcm_plug_read_transfer+0x197/0x2e0 sound/core/oss/pcm_plugin.c:651
snd_pcm_oss_read2+0x1f0/0x3f0 sound/core/oss/pcm_oss.c:1475
snd_pcm_oss_read1 sound/core/oss/pcm_oss.c:1532 [inline]
snd_pcm_oss_read+0x53a/0x6a0 sound/core/oss/pcm_oss.c:2753
__vfs_read+0x114/0x800 fs/read_write.c:416
vfs_read+0x194/0x3d0 fs/read_write.c:452
ksys_read+0x14f/0x2d0 fs/read_write.c:579
__do_sys_read fs/read_write.c:589 [inline]
__se_sys_read fs/read_write.c:587 [inline]
__x64_sys_read+0x73/0xb0 fs/read_write.c:587
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x447ee9
Code: e8 fc 0f 03 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 8b 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ff53d0b7ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00000000006ddc28 RCX: 0000000000447ee9
RDX: 0000000000001000 RSI: 0000000020000380 RDI: 0000000000000003
RBP: 00000000006ddc20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006ddc2c
R13: 00007ffe2f9f1e0f R14: 00007ff53d0b89c0 R15: 0000000000000000
Allocated by task 7542:
save_stack+0x45/0xd0 mm/kasan/kasan.c:448
set_track mm/kasan/kasan.c:460 [inline]
kasan_kmalloc mm/kasan/kasan.c:553 [inline]
kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531
__do_kmalloc_node mm/slab.c:3689 [inline]
__kmalloc_node+0x51/0x80 mm/slab.c:3696
kmalloc_node include/linux/slab.h:557 [inline]
kvmalloc_node+0x68/0x100 mm/util.c:423
kvmalloc include/linux/mm.h:577 [inline]
kvzalloc include/linux/mm.h:585 [inline]
snd_pcm_plugin_alloc+0x594/0x760 sound/core/oss/pcm_plugin.c:70
snd_pcm_plug_alloc+0x146/0x2f0 sound/core/oss/pcm_plugin.c:129
snd_pcm_oss_change_params_locked+0x210f/0x3750
sound/core/oss/pcm_oss.c:1039
snd_pcm_oss_change_params+0x7b/0xd0 sound/core/oss/pcm_oss.c:1102
snd_pcm_oss_get_active_substream+0x136/0x190 sound/core/oss/pcm_oss.c:1119
snd_pcm_oss_get_rate sound/core/oss/pcm_oss.c:1769 [inline]
snd_pcm_oss_set_rate sound/core/oss/pcm_oss.c:1761 [inline]
snd_pcm_oss_ioctl+0x13df/0x3390 sound/core/oss/pcm_oss.c:2609
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688
ksys_ioctl+0xab/0xd0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Freed by task 5341:
save_stack+0x45/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:3503 [inline]
kfree+0xcf/0x220 mm/slab.c:3822
security_context_to_sid_core.isra.0+0x2e4/0x5b0
security/selinux/ss/services.c:1504
security_context_to_sid_force+0x3c/0x50 security/selinux/ss/services.c:1566
selinux_inode_post_setxattr+0x119/0x360 security/selinux/hooks.c:3387
security_inode_post_setxattr+0xd1/0x150 security/security.c:760
__vfs_setxattr_noperm+0x343/0x410 fs/xattr.c:183
vfs_setxattr+0xda/0x100 fs/xattr.c:223
setxattr+0x26f/0x380 fs/xattr.c:450
path_setxattr+0x197/0x1b0 fs/xattr.c:469
__do_sys_lsetxattr fs/xattr.c:491 [inline]
__se_sys_lsetxattr fs/xattr.c:487 [inline]
__x64_sys_lsetxattr+0xc1/0x150 fs/xattr.c:487
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
The buggy address belongs to the object at ffff88809920de80
which belongs to the cache kmalloc-64 of size 64
The buggy address is located 0 bytes to the right of
64-byte region [ffff88809920de80, ffff88809920dec0)
The buggy address belongs to the page:
page:ffffea0002648340 count:1 mapcount:0 mapping:ffff88812c31c340 index:0x0
flags: 0xfffe0000000100(slab)
raw: 00fffe0000000100 ffffea00023c8fc8 ffff88812c314348 ffff88812c31c340
raw: 0000000000000000 ffff88809920d000 0000000100000020 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff88809920dd80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
ffff88809920de00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
> ffff88809920de80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
^
ffff88809920df00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
ffff88809920df80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
This bug is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
[email protected].
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches