syzbot


UBSAN: undefined-behaviour in snd_pcm_oss_change_params_locked

Status: upstream: reported C repro on 2020/09/17 01:42
Reported-by: syzbot+f7bb59ef98481f233322@syzkaller.appspotmail.com
First crash: 1556d, last: 1521d
Fix bisection: failed (error log, bisect log)
  

Sample crash report:
audit: type=1400 audit(1601835802.292:8): avc:  denied  { execmem } for  pid=6500 comm="syz-executor976" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
================================================================================
UBSAN: Undefined behaviour in ./include/linux/log2.h:61:13
shift exponent 64 is too large for 64-bit type 'long unsigned int'
CPU: 1 PID: 6500 Comm: syz-executor976 Not tainted 4.19.149-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+0x22c/0x33e lib/dump_stack.c:118
 ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
 __ubsan_handle_shift_out_of_bounds.cold+0x1c4/0x250 lib/ubsan.c:422
 __roundup_pow_of_two include/linux/log2.h:61 [inline]
 snd_pcm_oss_period_size sound/core/oss/pcm_oss.c:747 [inline]
 snd_pcm_oss_change_params_locked.cold+0x6d/0x11a sound/core/oss/pcm_oss.c:943
 snd_pcm_oss_change_params sound/core/oss/pcm_oss.c:1102 [inline]
 snd_pcm_oss_get_active_substream+0x164/0x1c0 sound/core/oss/pcm_oss.c:1119
 snd_pcm_oss_get_channels sound/core/oss/pcm_oss.c:1806 [inline]
 snd_pcm_oss_set_channels+0x244/0x380 sound/core/oss/pcm_oss.c:1798
 snd_pcm_oss_ioctl+0x12dd/0x33c0 sound/core/oss/pcm_oss.c:2644
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x440269
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 7b 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffc8b5f81a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440269
RDX: 0000000020000000 RSI: 00000000c

Crashes (1785):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/10/04 18:24 linux-4.19.y b09c34517e1a 5ef9c291 .config console log report syz C ci2-linux-4-19
2020/09/20 19:01 linux-4.19.y 015e94d0e37b 9564d2e9 .config console log report syz C ci2-linux-4-19
2020/10/21 13:55 linux-4.19.y ad326970d25c 99c64d5c .config console log report syz ci2-linux-4-19
2020/10/21 21:53 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 19:56 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 19:29 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 17:10 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 15:17 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 13:08 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 12:07 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 11:04 linux-4.19.y ad326970d25c 99c64d5c .config console log report info ci2-linux-4-19
2020/10/21 08:59 linux-4.19.y ad326970d25c e761439e .config console log report info ci2-linux-4-19
2020/10/21 07:20 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/21 05:56 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/21 05:12 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/21 03:24 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/21 00:50 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 23:16 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 19:16 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 17:52 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 14:57 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 11:51 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 06:42 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 04:37 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 03:35 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 03:29 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/20 00:38 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/19 20:23 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/19 18:35 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/19 15:28 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/19 14:27 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/19 12:00 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/19 10:11 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/19 08:51 linux-4.19.y ad326970d25c ff4a3345 .config console log report info ci2-linux-4-19
2020/10/19 07:38 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/19 04:12 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/19 02:25 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/19 01:08 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 23:40 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 22:29 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 17:45 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 17:44 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 15:56 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 14:50 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/10/18 11:31 linux-4.19.y ad326970d25c fea47c01 .config console log report info ci2-linux-4-19
2020/09/17 01:42 linux-4.19.y a87f96283793 8247808b .config console log report info ci2-linux-4-19
* Struck through repros no longer work on HEAD.