syzbot


KASAN: null-ptr-deref Read in linear_transfer

Status: closed as invalid on 2018/02/14 13:52
Subsystems: sound
[Documentation on labels]
Reported-by: syzbot+719e8c9082076249cfff@syzkaller.appspotmail.com
First crash: 2568d, last: 2568d

Sample crash report:
==================================================================
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..

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/01/17 00:48 linux-next fdddade65d7b a46e5318 .config console log report ci-upstream-next-kasan-gce
* Struck through repros no longer work on HEAD.