syzbot


KMSAN: uninit-value in tomoyo_check_inet_address

Status: fixed on 2019/05/27 12:48
Subsystems: tomoyo
[Documentation on labels]
Reported-by: syzbot+1018d578c410f9f37261@syzkaller.appspotmail.com
Fix commit: e6193f78bb68 tomoyo: Check address length before reading address family
First crash: 2046d, last: 2045d
Discussions (1)
Title Replies (including bot) Last reply
KMSAN: uninit-value in tomoyo_check_inet_address 3 (4) 2019/05/16 13:37

Sample crash report:
==================================================================
BUG: KMSAN: uninit-value in tomoyo_check_inet_address+0x143/0xd10 security/tomoyo/network.c:508
CPU: 1 PID: 26172 Comm: syz-executor.5 Not tainted 5.1.0+ #3
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+0x191/0x1f0 lib/dump_stack.c:113
 kmsan_report+0x130/0x2a0 mm/kmsan/kmsan.c:619
 __msan_warning+0x75/0xe0 mm/kmsan/kmsan_instr.c:310
 tomoyo_check_inet_address+0x143/0xd10 security/tomoyo/network.c:508
 tomoyo_socket_connect_permission+0x3ce/0x400 security/tomoyo/network.c:706
 tomoyo_socket_connect+0x8b/0xa0 security/tomoyo/tomoyo.c:456
 security_socket_connect+0x127/0x200 security/security.c:1948
 __sys_connect+0x536/0x820 net/socket.c:1804
 __do_sys_connect net/socket.c:1819 [inline]
 __se_sys_connect+0x8d/0xb0 net/socket.c:1816
 __x64_sys_connect+0x4a/0x70 net/socket.c:1816
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x458da9
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:00007f36458c7c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000458da9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f36458c86d4
R13: 00000000004bf2dc R14: 00000000004d0678 R15: 00000000ffffffff

Local variable description: ----address@__sys_connect
Variable was created at:
 sockfd_lookup_light net/socket.c:488 [inline]
 __sys_connect+0x8c/0x820 net/socket.c:1796
 __do_sys_connect net/socket.c:1819 [inline]
 __se_sys_connect+0x8d/0xb0 net/socket.c:1816
==================================================================

Crashes (33):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/05/16 21:25 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 20:11 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 19:33 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 16:34 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 15:10 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 14:53 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 14:43 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 14:38 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 14:21 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 13:58 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 13:04 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 12:26 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 12:22 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 12:09 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 12:03 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:56 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:47 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:45 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:41 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:35 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:33 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:33 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:30 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:26 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:24 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:20 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:14 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:13 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:13 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:07 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 11:06 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 10:50 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
2019/05/16 10:45 https://github.com/google/kmsan.git master 3b955a409bf3 f59a9cb5 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.