syzbot


KMSAN: uninit-value in capi_write

Status: fixed on 2019/10/09 10:54
Subsystems: isdn4linux
[Documentation on labels]
Reported-by: syzbot+0849c524d9c634f5ae66@syzkaller.appspotmail.com
Fix commit: fe163e534e5e isdn/capi: check message length in capi_write()
First crash: 2028d, last: 1749d
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 4.4 00/56] 4.4.194-stable review 62 (62) 2019/09/20 21:38
[PATCH 4.9 00/74] 4.9.194-stable review 80 (80) 2019/09/20 21:28
[PATCH 4.19 00/50] 4.19.74-stable review 62 (62) 2019/09/20 13:56
[PATCH 5.2 00/85] 5.2.16-stable review 94 (94) 2019/09/19 06:37
[PATCH 4.14 00/45] 4.14.145-stable review 51 (51) 2019/09/19 01:26
[PATCH net] isdn/capi: check message length in capi_write() 4 (4) 2019/09/07 15:47
Reminder: 3 open syzbot bugs in isdn subsystem 1 (1) 2019/07/24 03:57
KMSAN: uninit-value in capi_write 0 (1) 2019/02/11 22:03
Last patch testing requests (2)
Created Duration User Patch Repo Result
2019/08/29 19:34 18m ebiggers@kernel.org patch https://github.com/google/kmsan.git master OK
2019/08/22 16:45 12m linux.bhar@gmail.com patch https://github.com/google/kmsan.git master report log

Sample crash report:
sshd (10293) used greatest stack depth: 54128 bytes left
startpar (10225) used greatest stack depth: 53616 bytes left
==================================================================
BUG: KMSAN: uninit-value in capi_write+0x791/0xa90 drivers/isdn/capi/capi.c:700
CPU: 1 PID: 10376 Comm: syz-executor039 Not tainted 5.1.0-rc4+ #1
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+0x131/0x2a0 mm/kmsan/kmsan.c:619
 __msan_warning+0x7a/0xf0 mm/kmsan/kmsan_instr.c:310
 capi_write+0x791/0xa90 drivers/isdn/capi/capi.c:700
 do_loop_readv_writev fs/read_write.c:704 [inline]
 do_iter_write+0x813/0xdc0 fs/read_write.c:959
 vfs_writev fs/read_write.c:1002 [inline]
 do_writev+0x3f8/0x900 fs/read_write.c:1037
 __do_sys_writev fs/read_write.c:1110 [inline]
 __se_sys_writev+0x9b/0xb0 fs/read_write.c:1107
 __x64_sys_writev+0x4a/0x70 fs/read_write.c:1107
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x4401b9
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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffdfec63a68 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004401b9
RDX: 0000000000000001 RSI: 0000000020000180 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a40
R13: 0000000000401ad0 R14: 0000000000000000 R15: 0000000000000000

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:205 [inline]
 kmsan_internal_poison_shadow+0x92/0x150 mm/kmsan/kmsan.c:159
 kmsan_kmalloc+0xa9/0x130 mm/kmsan/kmsan_hooks.c:174
 kmsan_slab_alloc+0xe/0x10 mm/kmsan/kmsan_hooks.c:183
 slab_post_alloc_hook mm/slab.h:442 [inline]
 slab_alloc_node mm/slub.c:2771 [inline]
 __kmalloc_node_track_caller+0xead/0x1000 mm/slub.c:4399
 __kmalloc_reserve net/core/skbuff.c:140 [inline]
 __alloc_skb+0x309/0xa20 net/core/skbuff.c:208
 alloc_skb include/linux/skbuff.h:1059 [inline]
 capi_write+0x12f/0xa90 drivers/isdn/capi/capi.c:691
 do_loop_readv_writev fs/read_write.c:704 [inline]
 do_iter_write+0x813/0xdc0 fs/read_write.c:959
 vfs_writev fs/read_write.c:1002 [inline]
 do_writev+0x3f8/0x900 fs/read_write.c:1037
 __do_sys_writev fs/read_write.c:1110 [inline]
 __se_sys_writev+0x9b/0xb0 fs/read_write.c:1107
 __x64_sys_writev+0x4a/0x70 fs/read_write.c:1107
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
==================================================================

Crashes (445):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/04/14 21:24 https://github.com/google/kmsan.git master 199a02db1f61 505ab413 .config console log report syz C ci-upstream-kmsan-gce
2019/01/06 18:36 https://github.com/google/kmsan.git master 11587f6ee534 94f8adb5 .config console log report syz C ci-upstream-kmsan-gce
2019/10/09 09:10 https://github.com/google/kmsan.git master cebb918b7474 b1ebbfef .config console log report ci-upstream-kmsan-gce
2019/10/09 06:19 https://github.com/google/kmsan.git master cebb918b7474 b1ebbfef .config console log report ci-upstream-kmsan-gce
2019/10/09 00:15 https://github.com/google/kmsan.git master cebb918b7474 b1ebbfef .config console log report ci-upstream-kmsan-gce
2019/10/06 02:29 https://github.com/google/kmsan.git master 1e76a3e537c3 f3f7d9c8 .config console log report ci-upstream-kmsan-gce
2019/10/06 02:29 https://github.com/google/kmsan.git master 1e76a3e537c3 f3f7d9c8 .config console log report ci-upstream-kmsan-gce
2019/10/05 12:35 https://github.com/google/kmsan.git master 1e76a3e537c3 f3f7d9c8 .config console log report ci-upstream-kmsan-gce
2019/10/05 01:47 https://github.com/google/kmsan.git master 1e76a3e537c3 f3f7d9c8 .config console log report ci-upstream-kmsan-gce
2019/10/03 19:54 https://github.com/google/kmsan.git master 1e76a3e537c3 fc17ba49 .config console log report ci-upstream-kmsan-gce
2019/10/03 17:47 https://github.com/google/kmsan.git master 1e76a3e537c3 fc17ba49 .config console log report ci-upstream-kmsan-gce
2019/10/03 13:51 https://github.com/google/kmsan.git master 1e76a3e537c3 fc17ba49 .config console log report ci-upstream-kmsan-gce
2019/10/02 05:40 https://github.com/google/kmsan.git master f5f9d3ce4686 b7a87a83 .config console log report ci-upstream-kmsan-gce
2019/10/02 01:29 https://github.com/google/kmsan.git master f5f9d3ce4686 b7a87a83 .config console log report ci-upstream-kmsan-gce
2019/09/30 01:18 https://github.com/google/kmsan.git master 124037e07586 c1ad5441 .config console log report ci-upstream-kmsan-gce
2019/09/29 12:38 https://github.com/google/kmsan.git master 124037e07586 c1ad5441 .config console log report ci-upstream-kmsan-gce
2019/09/29 06:46 https://github.com/google/kmsan.git master 124037e07586 eb6b9855 .config console log report ci-upstream-kmsan-gce
2019/09/29 01:29 https://github.com/google/kmsan.git master 124037e07586 eb6b9855 .config console log report ci-upstream-kmsan-gce
2019/09/28 13:47 https://github.com/google/kmsan.git master 124037e07586 eb6b9855 .config console log report ci-upstream-kmsan-gce
2019/09/26 06:43 https://github.com/google/kmsan.git master cebbfdbcf2b7 24d405a3 .config console log report ci-upstream-kmsan-gce
2019/09/26 05:31 https://github.com/google/kmsan.git master cebbfdbcf2b7 24d405a3 .config console log report ci-upstream-kmsan-gce
2019/09/25 18:32 https://github.com/google/kmsan.git master cebbfdbcf2b7 a3355dba .config console log report ci-upstream-kmsan-gce
2019/09/24 17:25 https://github.com/google/kmsan.git master cebbfdbcf2b7 0942eab8 .config console log report ci-upstream-kmsan-gce
2019/09/24 13:17 https://github.com/google/kmsan.git master cebbfdbcf2b7 c68252d2 .config console log report ci-upstream-kmsan-gce
2019/09/23 07:54 https://github.com/google/kmsan.git master cebbfdbcf2b7 d96e88f3 .config console log report ci-upstream-kmsan-gce
2019/09/21 18:31 https://github.com/google/kmsan.git master cebbfdbcf2b7 d96e88f3 .config console log report ci-upstream-kmsan-gce
2019/09/21 17:30 https://github.com/google/kmsan.git master cebbfdbcf2b7 d96e88f3 .config console log report ci-upstream-kmsan-gce
2019/09/19 13:48 https://github.com/google/kmsan.git master cebbfdbcf2b7 eb940044 .config console log report ci-upstream-kmsan-gce
2019/09/17 18:46 https://github.com/google/kmsan.git master cebbfdbcf2b7 13dcda9b .config console log report ci-upstream-kmsan-gce
2019/09/15 03:24 https://github.com/google/kmsan.git master cebbfdbcf2b7 32d59357 .config console log report ci-upstream-kmsan-gce
2019/09/15 02:22 https://github.com/google/kmsan.git master cebbfdbcf2b7 32d59357 .config console log report ci-upstream-kmsan-gce
2019/09/14 15:17 https://github.com/google/kmsan.git master cebbfdbcf2b7 32d59357 .config console log report ci-upstream-kmsan-gce
2019/09/14 06:27 https://github.com/google/kmsan.git master cebbfdbcf2b7 32d59357 .config console log report ci-upstream-kmsan-gce
2019/09/13 17:50 https://github.com/google/kmsan.git master 523af7446149 40fa42bc .config console log report ci-upstream-kmsan-gce
2019/09/11 14:47 https://github.com/google/kmsan.git master 014077b5cd62 a60cb4cd .config console log report ci-upstream-kmsan-gce
2019/09/11 07:57 https://github.com/google/kmsan.git master 014077b5cd62 a60cb4cd .config console log report ci-upstream-kmsan-gce
2019/09/11 06:22 https://github.com/google/kmsan.git master 014077b5cd62 a60cb4cd .config console log report ci-upstream-kmsan-gce
2019/09/09 20:28 https://github.com/google/kmsan.git master 014077b5cd62 a60cb4cd .config console log report ci-upstream-kmsan-gce
2019/09/09 04:53 https://github.com/google/kmsan.git master 014077b5cd62 a60cb4cd .config console log report ci-upstream-kmsan-gce
2019/09/07 18:40 https://github.com/google/kmsan.git master 014077b5cd62 a60cb4cd .config console log report ci-upstream-kmsan-gce
2019/09/07 09:58 https://github.com/google/kmsan.git master 014077b5cd62 a60cb4cd .config console log report ci-upstream-kmsan-gce
2019/09/06 05:59 https://github.com/google/kmsan.git master 040b8306f758 040fda58 .config console log report ci-upstream-kmsan-gce
2019/09/05 22:04 https://github.com/google/kmsan.git master 040b8306f758 040fda58 .config console log report ci-upstream-kmsan-gce
2019/09/05 12:44 https://github.com/google/kmsan.git master 040b8306f758 040fda58 .config console log report ci-upstream-kmsan-gce
2019/09/04 17:34 https://github.com/google/kmsan.git master 4b523a2dfab0 12381952 .config console log report ci-upstream-kmsan-gce
2019/09/03 15:59 https://github.com/google/kmsan.git master f8fb621b6c16 48448e71 .config console log report ci-upstream-kmsan-gce
2019/01/03 19:11 https://github.com/google/kmsan.git master 68006459ade0 66fcd29b .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.