syzbot


KMSAN: kernel-infoleak in i2cdev_read

Status: fixed on 2021/11/10 00:50
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: 86ff25ed6cd8 i2c: dev: zero out array used for i2c reads from userspace
First crash: 694d, last: 569d

Sample crash report:
=====================================================
BUG: KMSAN: kernel-infoleak in kmsan_copy_to_user+0x9c/0xb0 mm/kmsan/kmsan_hooks.c:249
CPU: 0 PID: 8215 Comm: syz-executor242 Not tainted 5.12.0-rc6-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+0x24c/0x2e0 lib/dump_stack.c:120
 kmsan_report+0xfb/0x1e0 mm/kmsan/kmsan_report.c:118
 kmsan_internal_check_memory+0x48c/0x520 mm/kmsan/kmsan.c:437
 kmsan_copy_to_user+0x9c/0xb0 mm/kmsan/kmsan_hooks.c:249
 instrument_copy_to_user include/linux/instrumented.h:121 [inline]
 _copy_to_user+0x1ac/0x270 lib/usercopy.c:33
 copy_to_user include/linux/uaccess.h:209 [inline]
 i2cdev_read+0x23d/0x350 drivers/i2c/i2c-dev.c:153
 vfs_read+0x533/0x15a0 fs/read_write.c:494
 ksys_read+0x275/0x500 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read+0x92/0xb0 fs/read_write.c:642
 __x64_sys_read+0x4a/0x70 fs/read_write.c:642
 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x444189
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 90 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 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdc02fae58 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00000000004004a0 RCX: 0000000000444189
RDX: 0000000000001000 RSI: 0000000020000480 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00232d6332692f76 R09: 00007ffdc02faff8
R10: 000000000000001f R11: 0000000000000246 R12: 00000000004034a0
R13: 431bde82d7b634db R14: 00000000004b2018 R15: 00000000004004a0

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:121 [inline]
 kmsan_internal_poison_shadow+0x5c/0xf0 mm/kmsan/kmsan.c:104
 kmsan_slab_alloc+0x8e/0xe0 mm/kmsan/kmsan_hooks.c:76
 slab_alloc_node mm/slub.c:2922 [inline]
 slab_alloc mm/slub.c:2931 [inline]
 __kmalloc+0x387/0x550 mm/slub.c:4068
 kmalloc include/linux/slab.h:559 [inline]
 i2cdev_read+0x128/0x350 drivers/i2c/i2c-dev.c:144
 vfs_read+0x533/0x15a0 fs/read_write.c:494
 ksys_read+0x275/0x500 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read+0x92/0xb0 fs/read_write.c:642
 __x64_sys_read+0x4a/0x70 fs/read_write.c:642
 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Bytes 0-4095 of 4096 are uninitialized
Memory access of size 4096 starts at ffff888121d19000
Data copied to user address 0000000020000480
=====================================================

Crashes (592):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kmsan-gce 2021/06/11 02:23 https://github.com/google/kmsan.git master 6099c9da2f7d 1ba81399 .config console log report syz C KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/03/16 22:14 https://github.com/google/kmsan.git master 29ad81a1074a fdb2bb2c .config console log report syz C KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/16 03:07 https://github.com/google/kmsan.git master 57b5797c8013 f115ae98 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/15 10:37 https://github.com/google/kmsan.git master 57b5797c8013 b9a2f64e .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/15 03:12 https://github.com/google/kmsan.git master 57b5797c8013 94e0b707 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/14 12:19 https://github.com/google/kmsan.git master 57b5797c8013 484502bd .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/13 06:04 https://github.com/google/kmsan.git master 57b5797c8013 f415556d .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/13 01:37 https://github.com/google/kmsan.git master 57b5797c8013 f415556d .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/12 20:37 https://github.com/google/kmsan.git master 57b5797c8013 f415556d .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/12 13:44 https://github.com/google/kmsan.git master 57b5797c8013 a4869c92 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/11 23:45 https://github.com/google/kmsan.git master 57b5797c8013 8f5a7b8c .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/11 22:23 https://github.com/google/kmsan.git master 57b5797c8013 8f5a7b8c .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/09 04:53 https://github.com/google/kmsan.git master 57b5797c8013 1b20171a .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/08 11:16 https://github.com/google/kmsan.git master 57b5797c8013 95793bce .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/06 14:58 https://github.com/google/kmsan.git master 57b5797c8013 6c4484eb .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/06 04:54 https://github.com/google/kmsan.git master 57b5797c8013 55aa55c2 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/05 10:20 https://github.com/google/kmsan.git master 57b5797c8013 55aa55c2 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/03 20:52 https://github.com/google/kmsan.git master 57b5797c8013 55aa55c2 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/03 18:13 https://github.com/google/kmsan.git master 57b5797c8013 55aa55c2 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/03 05:00 https://github.com/google/kmsan.git master 57b5797c8013 55aa55c2 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/03 00:36 https://github.com/google/kmsan.git master 57b5797c8013 55aa55c2 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/02 16:27 https://github.com/google/kmsan.git master 57b5797c8013 658ebc66 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/02 09:40 https://github.com/google/kmsan.git master 57b5797c8013 658ebc66 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/07/01 20:57 https://github.com/google/kmsan.git master 57b5797c8013 658ebc66 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/06/30 02:02 https://github.com/google/kmsan.git master 57b5797c8013 a4fccb01 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/06/29 09:34 https://github.com/google/kmsan.git master 57b5797c8013 9d2ab5df .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/06/29 04:45 https://github.com/google/kmsan.git master 57b5797c8013 9d2ab5df .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce 2021/06/28 06:28 https://github.com/google/kmsan.git master 57b5797c8013 9d2ab5df .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/15 22:33 https://github.com/google/kmsan.git master 57b5797c8013 b9a2f64e .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/15 01:30 https://github.com/google/kmsan.git master 57b5797c8013 94e0b707 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/13 06:05 https://github.com/google/kmsan.git master 57b5797c8013 f415556d .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/13 03:42 https://github.com/google/kmsan.git master 57b5797c8013 f415556d .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/12 01:34 https://github.com/google/kmsan.git master 57b5797c8013 8f5a7b8c .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/10 09:16 https://github.com/google/kmsan.git master 57b5797c8013 8f5a7b8c .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/10 09:16 https://github.com/google/kmsan.git master 57b5797c8013 8f5a7b8c .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/10 02:29 https://github.com/google/kmsan.git master 57b5797c8013 8f5a7b8c .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/09 03:13 https://github.com/google/kmsan.git master 57b5797c8013 1b20171a .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/09 00:25 https://github.com/google/kmsan.git master 57b5797c8013 1b20171a .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/08 07:25 https://github.com/google/kmsan.git master 57b5797c8013 95793bce .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/07 00:24 https://github.com/google/kmsan.git master 57b5797c8013 cca78469 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/06 16:29 https://github.com/google/kmsan.git master 57b5797c8013 6c4484eb .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/05 01:38 https://github.com/google/kmsan.git master 57b5797c8013 55aa55c2 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/03 03:27 https://github.com/google/kmsan.git master 57b5797c8013 55aa55c2 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/07/01 06:03 https://github.com/google/kmsan.git master 57b5797c8013 38a885d1 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/06/30 23:18 https://github.com/google/kmsan.git master 57b5797c8013 38a885d1 .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/06/28 12:11 https://github.com/google/kmsan.git master 57b5797c8013 9d2ab5df .config console log report info KMSAN: kernel-infoleak in i2cdev_read
ci-upstream-kmsan-gce-386 2021/03/12 16:00 https://github.com/google/kmsan.git master 29ad81a1074a 429d8a6b .config console log report info KMSAN: kernel-infoleak in i2cdev_read
* Struck through repros no longer work on HEAD.