syzbot


KMSAN: kernel-infoleak in move_addr_to_user

Status: fixed on 2019/03/06 07:43
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: 7d033c9f6a7f ipv6: fix kernel-infoleak in ipv6_local_error()
First crash: 1363d, last: 1313d
similar bugs (5):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: kernel-infoleak in move_addr_to_user (3) C 79 745d 779d 17/24 fixed on 2020/09/28 09:09
upstream KMSAN: kernel-infoleak in move_addr_to_user (2) C 8 1285d 1299d 12/24 fixed on 2019/03/28 12:00
upstream KMSAN: kernel-infoleak in move_addr_to_user (4) C 59 577d 629d 21/24 fixed on 2021/03/10 01:48
upstream KMSAN: kernel-infoleak in move_addr_to_user (5) 3 427d 568d 22/24 fixed on 2021/11/10 00:50
upstream KMSAN: kernel-infoleak in move_addr_to_user (6) C 4 247d 285d 22/24 fixed on 2022/03/08 16:11

Sample crash report:
==================================================================
BUG: KMSAN: kernel-infoleak in _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32
CPU: 0 PID: 11325 Comm: syz-executor.1 Not tainted 5.0.0-rc1+ #9
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+0x173/0x1d0 lib/dump_stack.c:113
 kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:600
 kmsan_internal_check_memory+0x9e4/0xb10 mm/kmsan/kmsan.c:692
 kmsan_copy_to_user+0xab/0xc0 mm/kmsan/kmsan_hooks.c:601
 _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32
netlink: 8 bytes leftover after parsing attributes in process `syz-executor.3'.
 copy_to_user include/linux/uaccess.h:174 [inline]
 move_addr_to_user+0x311/0x570 net/socket.c:227
 ___sys_recvmsg+0xb65/0x1310 net/socket.c:2284
 do_recvmmsg+0x646/0x10c0 net/socket.c:2391
 __sys_recvmmsg net/socket.c:2472 [inline]
 __do_sys_recvmmsg net/socket.c:2493 [inline]
 __se_sys_recvmmsg+0x25d/0x350 net/socket.c:2486
 __x64_sys_recvmmsg+0x62/0x80 net/socket.c:2486
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x457e29
Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fbe46048c78 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000000457e29
RDX: 0000000000000003 RSI: 0000000020000e40 RDI: 0000000000000004
RBP: 000000000073bf00 R08: 0000000020000f00 R09: 0000000000000000
R10: 0000000000000020 R11: 0000000000000246 R12: 00007fbe460496d4
R13: 00000000004c4b3e R14: 00000000004d8648 R15: 00000000ffffffff

Local variable description: ----addr@___sys_recvmsg
Variable was created at:
 ___sys_recvmsg+0xf6/0x1310 net/socket.c:2245
 do_recvmmsg+0x646/0x10c0 net/socket.c:2391

Bytes 0-31 of 32 are uninitialized
Memory access of size 32 starts at ffff888036cefbb0
Data copied to user address 0000000020000040
==================================================================

Crashes (5):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kmsan-gce 2019/02/27 07:28 https://github.com/google/kmsan.git master fa1981bee40f f2468c12 .config log report
ci-upstream-kmsan-gce 2019/01/15 03:42 https://github.com/google/kmsan.git master 02f2d5aea531 ebacf5cb .config log report
ci-upstream-kmsan-gce 2019/01/14 15:34 https://github.com/google/kmsan.git master 02f2d5aea531 95485883 .config log report
ci-upstream-kmsan-gce 2019/01/10 00:10 https://github.com/google/kmsan.git master a6846a32c96d 45c0c1b1 .config log report
ci-upstream-kmsan-gce 2019/01/08 01:06 https://github.com/google/kmsan.git master 48128c3ca084 69d69aa9 .config log report
* Struck through repros no longer work on HEAD.