KASAN: null-ptr-deref Read in linear_transfer

10 views
Skip to first unread message

syzbot

unread,
Jan 16, 2018, 9:58:06 PM1/16/18
to syzkaller-upst...@googlegroups.com
Hello,

syzkaller hit the following crash on
fdddade65d7b5f8779374eb73d09889185280f60
git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master
compiler: gcc (GCC) 7.1.1 20170620
.config is attached
Raw console output is attached.
Unfortunately, I don't have any reproducer for this bug yet.
CC: [alsa-...@alsa-project.org linux-...@vger.kernel.org
pe...@perex.cz ti...@suse.com]

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+719e8c...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.

==================================================================
BUG: KASAN: null-ptr-deref in memcpy include/linux/string.h:344 [inline]
BUG: KASAN: null-ptr-deref in do_convert sound/core/oss/linear.c:48 [inline]
BUG: KASAN: null-ptr-deref in convert sound/core/oss/linear.c:81 [inline]
BUG: KASAN: null-ptr-deref in linear_transfer+0x70c/0x900
sound/core/oss/linear.c:110
Read of size 1 at addr (null) by task syz-executor0/12370

CPU: 0 PID: 12370 Comm: syz-executor0 Not tainted 4.15.0-rc8-next-20180116+
#98
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x194/0x257 lib/dump_stack.c:53
kasan_report_error mm/kasan/report.c:352 [inline]
kasan_report+0x13f/0x360 mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x137/0x190 mm/kasan/kasan.c:267
memcpy+0x23/0x50 mm/kasan/kasan.c:302
memcpy include/linux/string.h:344 [inline]
do_convert sound/core/oss/linear.c:48 [inline]
convert sound/core/oss/linear.c:81 [inline]
linear_transfer+0x70c/0x900 sound/core/oss/linear.c:110
snd_pcm_plug_write_transfer+0x24e/0x410 sound/core/oss/pcm_plugin.c:619
snd_pcm_oss_write2+0x260/0x420 sound/core/oss/pcm_oss.c:1310
snd_pcm_oss_sync1+0x1cc/0x550 sound/core/oss/pcm_oss.c:1543
snd_pcm_oss_sync+0x5b6/0x830 sound/core/oss/pcm_oss.c:1617
snd_pcm_oss_release+0x20b/0x280 sound/core/oss/pcm_oss.c:2444
__fput+0x327/0x7e0 fs/file_table.c:209
____fput+0x15/0x20 fs/file_table.c:243
task_work_run+0x199/0x270 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:191 [inline]
exit_to_usermode_loop+0x275/0x2f0 arch/x86/entry/common.c:165
prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline]
syscall_return_slowpath+0x490/0x550 arch/x86/entry/common.c:264
entry_SYSCALL_64_fastpath+0x9e/0xa0
RIP: 0033:0x452df9
RSP: 002b:00007f01d55a3c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000009
RAX: fffffffffffffffb RBX: 000000000071bea0 RCX: 0000000000452df9
RDX: 000000000100000b RSI: 0000000000002000 RDI: 000000002029f000
RBP: 00000000000003bc R08: 0000000000000013 R09: 0000000000000000
R10: 0000000000000051 R11: 0000000000000212 R12: 00000000006f3a40
R13: 00000000ffffffff R14: 00007f01d55a46d4 R15: 0000000000000000
==================================================================
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 12370 Comm: syz-executor0 Tainted: G B
4.15.0-rc8-next-20180116+ #98
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x194/0x257 lib/dump_stack.c:53
panic+0x1e4/0x41c kernel/panic.c:183
kasan_end_report+0x50/0x50 mm/kasan/report.c:180
kasan_report_error mm/kasan/report.c:359 [inline]
kasan_report+0x148/0x360 mm/kasan/report.c:412
check_memory_region_inline mm/kasan/kasan.c:260 [inline]
check_memory_region+0x137/0x190 mm/kasan/kasan.c:267
memcpy+0x23/0x50 mm/kasan/kasan.c:302
memcpy include/linux/string.h:344 [inline]
do_convert sound/core/oss/linear.c:48 [inline]
convert sound/core/oss/linear.c:81 [inline]
linear_transfer+0x70c/0x900 sound/core/oss/linear.c:110
snd_pcm_plug_write_transfer+0x24e/0x410 sound/core/oss/pcm_plugin.c:619
snd_pcm_oss_write2+0x260/0x420 sound/core/oss/pcm_oss.c:1310
snd_pcm_oss_sync1+0x1cc/0x550 sound/core/oss/pcm_oss.c:1543
snd_pcm_oss_sync+0x5b6/0x830 sound/core/oss/pcm_oss.c:1617
snd_pcm_oss_release+0x20b/0x280 sound/core/oss/pcm_oss.c:2444
__fput+0x327/0x7e0 fs/file_table.c:209
____fput+0x15/0x20 fs/file_table.c:243
task_work_run+0x199/0x270 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:191 [inline]
exit_to_usermode_loop+0x275/0x2f0 arch/x86/entry/common.c:165
prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline]
syscall_return_slowpath+0x490/0x550 arch/x86/entry/common.c:264
entry_SYSCALL_64_fastpath+0x9e/0xa0
RIP: 0033:0x452df9
RSP: 002b:00007f01d55a3c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000009
RAX: fffffffffffffffb RBX: 000000000071bea0 RCX: 0000000000452df9
RDX: 000000000100000b RSI: 0000000000002000 RDI: 000000002029f000
RBP: 00000000000003bc R08: 0000000000000013 R09: 0000000000000000
R10: 0000000000000051 R11: 0000000000000212 R12: 00000000006f3a40
R13: 00000000ffffffff R14: 00007f01d55a46d4 R15: 0000000000000000
Dumping ftrace buffer:
(ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
To upstream this report, please reply with:
#syz upstream
config.txt
raw.log.txt

Dmitry Vyukov

unread,
Feb 14, 2018, 8:52:48 AM2/14/18
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation
old bug bankruptcy

#syz invalid
> --
> You received this message because you are subscribed to the Google Groups
> "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to syzkaller-upstream-m...@googlegroups.com.
> To post to this group, send email to
> syzkaller-upst...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/syzkaller-upstream-moderation/001a114044da0504870562f004b1%40google.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages