syzbot


KMSAN: uninit-value in video_usercopy (2)

Status: fixed on 2021/11/10 00:50
Subsystems: media
[Documentation on labels]
Reported-by: syzbot+142888ffec98ab194028@syzkaller.appspotmail.com
Fix commit: c344f07aa1b4 media: v4l2-core: ignore native time32 ioctls on 64-bit
First crash: 1199d, last: 974d
Discussions (7)
Title Replies (including bot) Last reply
[PATCH 5.13 000/800] 5.13.2-rc1 review 840 (840) 2021/07/28 17:46
[PATCH 5.12 000/700] 5.12.17-rc1 review 708 (708) 2021/07/13 21:37
[PATCH] media: v4l2-ioctl: explicitly initialize argument buffer 2 (2) 2021/06/18 10:41
[PATCH v3 0/7] media: v4l2: compat ioctl fixes 24 (24) 2021/06/15 09:30
[PATCH v2 0/7] media: v4l2: compat ioctl fixes 11 (11) 2021/06/14 08:00
[PATCH 1/2] media: v4l2-core: ignore native time32 ioctls on 64-bit 7 (7) 2021/03/25 07:41
[syzbot] KMSAN: uninit-value in video_usercopy (2) 6 (7) 2021/03/16 17:26
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in video_usercopy media C 28 1404d 1404d 15/26 fixed on 2020/09/25 01:17

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in check_array_args drivers/media/v4l2-core/v4l2-ioctl.c:2999 [inline]
BUG: KMSAN: uninit-value in video_usercopy+0x137b/0x3ad0 drivers/media/v4l2-core/v4l2-ioctl.c:3273
 check_array_args drivers/media/v4l2-core/v4l2-ioctl.c:2999 [inline]
 video_usercopy+0x137b/0x3ad0 drivers/media/v4l2-core/v4l2-ioctl.c:3273
 video_ioctl2+0x9f/0xb0 drivers/media/v4l2-core/v4l2-ioctl.c:3345
 v4l2_ioctl+0x263/0x290 drivers/media/v4l2-core/v4l2-dev.c:366
 v4l2_compat_ioctl32+0x2e0/0x390 drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1248
 __do_compat_sys_ioctl fs/ioctl.c:1167 [inline]
 __se_compat_sys_ioctl+0x876/0x1150 fs/ioctl.c:1109
 __ia32_compat_sys_ioctl+0xd9/0x110 fs/ioctl.c:1109
 do_syscall_32_irqs_on arch/x86/entry/common.c:80 [inline]
 __do_fast_syscall_32+0x96/0xe0 arch/x86/entry/common.c:145
 do_fast_syscall_32+0x34/0x70 arch/x86/entry/common.c:170
 do_SYSENTER_32+0x1b/0x20 arch/x86/entry/common.c:213
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c

Local variable ----sbuf@video_usercopy created at:
 video_usercopy+0xa8/0x3ad0 drivers/media/v4l2-core/v4l2-ioctl.c:3243
 video_ioctl2+0x9f/0xb0 drivers/media/v4l2-core/v4l2-ioctl.c:3345
=====================================================
Kernel panic - not syncing: panic_on_kmsan set ...
CPU: 1 PID: 11885 Comm: syz-executor.3 Tainted: G    B             5.13.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x25a/0x2f6 lib/dump_stack.c:120
 panic+0x4c7/0xe98 kernel/panic.c:231
 kmsan_report+0x2ee/0x300 mm/kmsan/report.c:186
 __msan_warning+0xd7/0x150 mm/kmsan/instrumentation.c:208
 check_array_args drivers/media/v4l2-core/v4l2-ioctl.c:2999 [inline]
 video_usercopy+0x137b/0x3ad0 drivers/media/v4l2-core/v4l2-ioctl.c:3273
 video_ioctl2+0x9f/0xb0 drivers/media/v4l2-core/v4l2-ioctl.c:3345
 v4l2_ioctl+0x263/0x290 drivers/media/v4l2-core/v4l2-dev.c:366
 v4l2_compat_ioctl32+0x2e0/0x390 drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1248
 __do_compat_sys_ioctl fs/ioctl.c:1167 [inline]
 __se_compat_sys_ioctl+0x876/0x1150 fs/ioctl.c:1109
 __ia32_compat_sys_ioctl+0xd9/0x110 fs/ioctl.c:1109
 do_syscall_32_irqs_on arch/x86/entry/common.c:80 [inline]
 __do_fast_syscall_32+0x96/0xe0 arch/x86/entry/common.c:145
 do_fast_syscall_32+0x34/0x70 arch/x86/entry/common.c:170
 do_SYSENTER_32+0x1b/0x20 arch/x86/entry/common.c:213
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
RIP: 0023:0xf6ec1549
Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f44bb5fc EFLAGS: 00000296 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000c0505609
RDX: 0000000020002100 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..
----------------
Code disassembly (best guess):
   0:	03 74 c0 01          	add    0x1(%rax,%rax,8),%esi
   4:	10 05 03 74 b8 01    	adc    %al,0x1b87403(%rip)        # 0x1b8740d
   a:	10 06                	adc    %al,(%rsi)
   c:	03 74 b4 01          	add    0x1(%rsp,%rsi,4),%esi
  10:	10 07                	adc    %al,(%rdi)
  12:	03 74 b0 01          	add    0x1(%rax,%rsi,4),%esi
  16:	10 08                	adc    %cl,(%rax)
  18:	03 74 d8 01          	add    0x1(%rax,%rbx,8),%esi
  1c:	00 00                	add    %al,(%rax)
  1e:	00 00                	add    %al,(%rax)
  20:	00 51 52             	add    %dl,0x52(%rcx)
  23:	55                   	push   %rbp
  24:	89 e5                	mov    %esp,%ebp
  26:	0f 34                	sysenter
  28:	cd 80                	int    $0x80
* 2a:	5d                   	pop    %rbp <-- trapping instruction
  2b:	5a                   	pop    %rdx
  2c:	59                   	pop    %rcx
  2d:	c3                   	retq
  2e:	90                   	nop
  2f:	90                   	nop
  30:	90                   	nop
  31:	90                   	nop
  32:	8d b4 26 00 00 00 00 	lea    0x0(%rsi,%riz,1),%esi
  39:	8d b4 26 00 00 00 00 	lea    0x0(%rsi,%riz,1),%esi

Crashes (13058):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/24 19:18 https://github.com/google/kmsan.git master 5e561f94df41 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/24 18:00 https://github.com/google/kmsan.git master 5e561f94df41 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/24 16:54 https://github.com/google/kmsan.git master 5e561f94df41 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/24 13:32 https://github.com/google/kmsan.git master 5e561f94df41 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/24 04:28 https://github.com/google/kmsan.git master 5e561f94df41 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/24 02:06 https://github.com/google/kmsan.git master 5e561f94df41 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/24 00:49 https://github.com/google/kmsan.git master 5e561f94df41 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/24 00:49 https://github.com/google/kmsan.git master 5e561f94df41 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/23 23:44 https://github.com/google/kmsan.git master 5e561f94df41 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/23 22:33 https://github.com/google/kmsan.git master 5e561f94df41 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/23 19:48 https://github.com/google/kmsan.git master 5e561f94df41 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/23 16:14 https://github.com/google/kmsan.git master 5e561f94df41 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/23 09:23 https://github.com/google/kmsan.git master c9006efa1749 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/23 07:40 https://github.com/google/kmsan.git master c9006efa1749 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/23 07:05 https://github.com/google/kmsan.git master c9006efa1749 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/23 02:31 https://github.com/google/kmsan.git master c9006efa1749 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/23 00:54 https://github.com/google/kmsan.git master c9006efa1749 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/22 20:37 https://github.com/google/kmsan.git master c9006efa1749 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/22 18:45 https://github.com/google/kmsan.git master c9006efa1749 8cac236e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/22 16:26 https://github.com/google/kmsan.git master f881dcecdc7a 169724fe .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/22 15:23 https://github.com/google/kmsan.git master f881dcecdc7a 169724fe .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/22 15:08 https://github.com/google/kmsan.git master f881dcecdc7a 169724fe .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/22 01:37 https://github.com/google/kmsan.git master 1e72fa33ea66 169724fe .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/22 00:00 https://github.com/google/kmsan.git master 1e72fa33ea66 169724fe .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/21 18:28 https://github.com/google/kmsan.git master 1e72fa33ea66 169724fe .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/21 07:06 https://github.com/google/kmsan.git master be0f0dd6a24b af796c18 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/21 03:43 https://github.com/google/kmsan.git master be0f0dd6a24b af796c18 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/21 02:41 https://github.com/google/kmsan.git master be0f0dd6a24b af796c18 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/21 00:34 https://github.com/google/kmsan.git master be0f0dd6a24b af796c18 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/20 21:56 https://github.com/google/kmsan.git master be0f0dd6a24b af796c18 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/20 19:42 https://github.com/google/kmsan.git master be0f0dd6a24b af796c18 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/20 18:01 https://github.com/google/kmsan.git master be0f0dd6a24b af796c18 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/20 09:05 https://github.com/google/kmsan.git master 80de0ac1c3d2 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/20 02:46 https://github.com/google/kmsan.git master 80de0ac1c3d2 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/19 22:04 https://github.com/google/kmsan.git master 80de0ac1c3d2 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/19 16:58 https://github.com/google/kmsan.git master 80de0ac1c3d2 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/19 10:19 https://github.com/google/kmsan.git master 80de0ac1c3d2 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/19 02:20 https://github.com/google/kmsan.git master 80de0ac1c3d2 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/18 22:36 https://github.com/google/kmsan.git master 80de0ac1c3d2 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/18 09:11 https://github.com/google/kmsan.git master 80de0ac1c3d2 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/18 07:02 https://github.com/google/kmsan.git master 43575797a31c 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/18 03:29 https://github.com/google/kmsan.git master 43575797a31c 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/18 03:27 https://github.com/google/kmsan.git master 43575797a31c 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/18 02:17 https://github.com/google/kmsan.git master 43575797a31c 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/09/17 23:26 https://github.com/google/kmsan.git master 43575797a31c 70b76c1d .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/03/16 08:59 https://github.com/google/kmsan.git master 29ad81a1074a fdb2bb2c .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/03/16 04:29 https://github.com/google/kmsan.git master 29ad81a1074a fdb2bb2c .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
2021/02/11 19:41 https://github.com/google/kmsan.git master 29ad81a1074a a5f86b15 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in video_usercopy
* Struck through repros no longer work on HEAD.