syzbot


KMSAN: uninit-value in __crc32c_le_base

Status: fixed on 2020/02/14 01:19
Subsystems: crypto
[Documentation on labels]
Reported-by: syzbot+6dcbfea81cd3d4dd0b02@syzkaller.appspotmail.com
Fix commit: b6f3320b1d52 sctp: fully initialize v4 addr in some functions
First crash: 1613d, last: 1565d
Discussions (7)
Title Replies (including bot) Last reply
[PATCH 4.19 000/219] 4.19.92-stable review 243 (243) 2020/01/10 11:51
[PATCH 4.4 000/137] 4.4.208-stable review 143 (143) 2020/01/04 12:32
[PATCH 4.9 000/171] 4.9.208-stable review 176 (176) 2020/01/03 21:51
[PATCH 5.4 000/434] 5.4.7-stable review 465 (465) 2020/01/03 16:53
[PATCH 4.14 000/161] 4.14.161-stable review 170 (170) 2019/12/31 16:18
[PATCH net] sctp: fully initialize v4 addr in some functions 3 (3) 2019/12/09 18:17
KMSAN: uninit-value in __crc32c_le_base 3 (4) 2019/11/27 13:22
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in __crc32c_le_base (4) btrfs 38 9h39m 19d 0/26 upstream: reported on 2024/04/01 21:52
upstream KMSAN: uninit-value in __crc32c_le_base (3) xfs 15526 41d 359d 26/26 fixed on 2024/03/20 11:33
upstream KMSAN: uninit-value in __crc32c_le_base (2) crypto C 6207 384d 1456d 0/26 closed as invalid on 2023/04/06 23:31

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in crc32_body lib/crc32.c:112 [inline]
BUG: KMSAN: uninit-value in crc32_le_generic lib/crc32.c:179 [inline]
BUG: KMSAN: uninit-value in __crc32c_le_base+0x4fa/0xd30 lib/crc32.c:202
CPU: 1 PID: 12411 Comm: syz-executor.1 Not tainted 5.4.0-rc5-syzkaller #0
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+0x128/0x220 mm/kmsan/kmsan_report.c:108
 __msan_warning+0x73/0xe0 mm/kmsan/kmsan_instr.c:245
 crc32_body lib/crc32.c:112 [inline]
 crc32_le_generic lib/crc32.c:179 [inline]
 __crc32c_le_base+0x4fa/0xd30 lib/crc32.c:202
 chksum_update+0xb2/0x110 crypto/crc32c_generic.c:90
 crypto_shash_update+0x4c5/0x530 crypto/shash.c:107
 crc32c+0x150/0x220 lib/libcrc32c.c:47
 sctp_csum_update+0x89/0xa0 include/net/sctp/checksum.h:36
 __skb_checksum+0x1297/0x12a0 net/core/skbuff.c:2640
 sctp_compute_cksum include/net/sctp/checksum.h:59 [inline]
 sctp_packet_pack net/sctp/output.c:528 [inline]
 sctp_packet_transmit+0x40fb/0x4250 net/sctp/output.c:597
 sctp_outq_flush_transports net/sctp/outqueue.c:1146 [inline]
 sctp_outq_flush+0x1823/0x5d80 net/sctp/outqueue.c:1194
 sctp_outq_uncork+0xd0/0xf0 net/sctp/outqueue.c:757
 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1781 [inline]
 sctp_side_effects net/sctp/sm_sideeffect.c:1184 [inline]
 sctp_do_sm+0x8fe1/0x9720 net/sctp/sm_sideeffect.c:1155
 sctp_primitive_REQUESTHEARTBEAT+0x175/0x1a0 net/sctp/primitive.c:185
 sctp_apply_peer_addr_params+0x212/0x1d40 net/sctp/socket.c:2433
 sctp_setsockopt_peer_addr_params net/sctp/socket.c:2686 [inline]
 sctp_setsockopt+0x189bb/0x19090 net/sctp/socket.c:4672
 sock_common_setsockopt+0x13b/0x170 net/core/sock.c:3151
 __sys_setsockopt+0x7c3/0xa30 net/socket.c:2084
 __do_sys_setsockopt net/socket.c:2100 [inline]
 __se_sys_setsockopt+0xdd/0x100 net/socket.c:2097
 __x64_sys_setsockopt+0x62/0x80 net/socket.c:2097
 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x45a639
Code: ad b6 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 b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f2a8cb65c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 000000000045a639
RDX: 0000000000000009 RSI: 0000000000000084 RDI: 0000000000000004
RBP: 000000000075bfc8 R08: 0000000000000098 R09: 0000000000000000
R10: 0000000020000440 R11: 0000000000000246 R12: 00007f2a8cb666d4
R13: 00000000004d1a88 R14: 00000000004e08f0 R15: 00000000ffffffff

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:151 [inline]
 kmsan_internal_chain_origin+0xbd/0x180 mm/kmsan/kmsan.c:319
 kmsan_memcpy_memmove_metadata+0x25c/0x2e0 mm/kmsan/kmsan.c:254
 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:274
 __msan_memcpy+0x56/0x70 mm/kmsan/kmsan_instr.c:129
 skb_put_data include/linux/skbuff.h:2217 [inline]
 sctp_packet_pack net/sctp/output.c:470 [inline]
 sctp_packet_transmit+0x1d9e/0x4250 net/sctp/output.c:597
 sctp_outq_flush_transports net/sctp/outqueue.c:1146 [inline]
 sctp_outq_flush+0x1823/0x5d80 net/sctp/outqueue.c:1194
 sctp_outq_uncork+0xd0/0xf0 net/sctp/outqueue.c:757
 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1781 [inline]
 sctp_side_effects net/sctp/sm_sideeffect.c:1184 [inline]
 sctp_do_sm+0x8fe1/0x9720 net/sctp/sm_sideeffect.c:1155
 sctp_primitive_REQUESTHEARTBEAT+0x175/0x1a0 net/sctp/primitive.c:185
 sctp_apply_peer_addr_params+0x212/0x1d40 net/sctp/socket.c:2433
 sctp_setsockopt_peer_addr_params net/sctp/socket.c:2686 [inline]
 sctp_setsockopt+0x189bb/0x19090 net/sctp/socket.c:4672
 sock_common_setsockopt+0x13b/0x170 net/core/sock.c:3151
 __sys_setsockopt+0x7c3/0xa30 net/socket.c:2084
 __do_sys_setsockopt net/socket.c:2100 [inline]
 __se_sys_setsockopt+0xdd/0x100 net/socket.c:2097
 __x64_sys_setsockopt+0x62/0x80 net/socket.c:2097
 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:151 [inline]
 kmsan_internal_chain_origin+0xbd/0x180 mm/kmsan/kmsan.c:319
 kmsan_memcpy_memmove_metadata+0x25c/0x2e0 mm/kmsan/kmsan.c:254
 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:274
 __msan_memcpy+0x56/0x70 mm/kmsan/kmsan_instr.c:129
 skb_put_data include/linux/skbuff.h:2217 [inline]
 sctp_addto_chunk net/sctp/sm_make_chunk.c:1494 [inline]
 sctp_make_heartbeat+0x612/0x9e0 net/sctp/sm_make_chunk.c:1164
 sctp_sf_heartbeat net/sctp/sm_statefuns.c:990 [inline]
 sctp_sf_do_prm_requestheartbeat+0x8f/0x4b0 net/sctp/sm_statefuns.c:5329
 sctp_do_sm+0x2b2/0x9720 net/sctp/sm_sideeffect.c:1152
 sctp_primitive_REQUESTHEARTBEAT+0x175/0x1a0 net/sctp/primitive.c:185
 sctp_apply_peer_addr_params+0x212/0x1d40 net/sctp/socket.c:2433
 sctp_setsockopt_peer_addr_params net/sctp/socket.c:2686 [inline]
 sctp_setsockopt+0x189bb/0x19090 net/sctp/socket.c:4672
 sock_common_setsockopt+0x13b/0x170 net/core/sock.c:3151
 __sys_setsockopt+0x7c3/0xa30 net/socket.c:2084
 __do_sys_setsockopt net/socket.c:2100 [inline]
 __se_sys_setsockopt+0xdd/0x100 net/socket.c:2097
 __x64_sys_setsockopt+0x62/0x80 net/socket.c:2097
 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:151 [inline]
 kmsan_internal_chain_origin+0xbd/0x180 mm/kmsan/kmsan.c:319
 kmsan_memcpy_memmove_metadata+0x25c/0x2e0 mm/kmsan/kmsan.c:254
 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:274
 __msan_memcpy+0x56/0x70 mm/kmsan/kmsan_instr.c:129
 sctp_make_heartbeat+0x3e9/0x9e0 net/sctp/sm_make_chunk.c:1156
 sctp_sf_heartbeat net/sctp/sm_statefuns.c:990 [inline]
 sctp_sf_do_prm_requestheartbeat+0x8f/0x4b0 net/sctp/sm_statefuns.c:5329
 sctp_do_sm+0x2b2/0x9720 net/sctp/sm_sideeffect.c:1152
 sctp_primitive_REQUESTHEARTBEAT+0x175/0x1a0 net/sctp/primitive.c:185
 sctp_apply_peer_addr_params+0x212/0x1d40 net/sctp/socket.c:2433
 sctp_setsockopt_peer_addr_params net/sctp/socket.c:2686 [inline]
 sctp_setsockopt+0x189bb/0x19090 net/sctp/socket.c:4672
 sock_common_setsockopt+0x13b/0x170 net/core/sock.c:3151
 __sys_setsockopt+0x7c3/0xa30 net/socket.c:2084
 __do_sys_setsockopt net/socket.c:2100 [inline]
 __se_sys_setsockopt+0xdd/0x100 net/socket.c:2097
 __x64_sys_setsockopt+0x62/0x80 net/socket.c:2097
 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:151 [inline]
 kmsan_internal_chain_origin+0xbd/0x180 mm/kmsan/kmsan.c:319
 kmsan_memcpy_memmove_metadata+0x25c/0x2e0 mm/kmsan/kmsan.c:254
 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:274
 __msan_memcpy+0x56/0x70 mm/kmsan/kmsan_instr.c:129
 sctp_transport_init net/sctp/transport.c:47 [inline]
 sctp_transport_new+0x248/0xa00 net/sctp/transport.c:100
 sctp_assoc_add_peer+0x5ba/0x2030 net/sctp/associola.c:611
 sctp_process_param net/sctp/sm_make_chunk.c:2524 [inline]
 sctp_process_init+0x162b/0x3e30 net/sctp/sm_make_chunk.c:2345
 sctp_cmd_process_init net/sctp/sm_sideeffect.c:667 [inline]
 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1374 [inline]
 sctp_side_effects net/sctp/sm_sideeffect.c:1184 [inline]
 sctp_do_sm+0x1b8b/0x9720 net/sctp/sm_sideeffect.c:1155
 sctp_assoc_bh_rcv+0x65a/0xd80 net/sctp/associola.c:1048
 sctp_inq_push+0x300/0x420 net/sctp/inqueue.c:80
 sctp_backlog_rcv+0x2d7/0x11a0 net/sctp/input.c:344
 sk_backlog_rcv include/net/sock.h:950 [inline]
 __release_sock+0x448/0x640 net/core/sock.c:2439
 release_sock+0x99/0x2a0 net/core/sock.c:2955
 sctp_wait_for_connect+0x3d7/0x840 net/sctp/socket.c:9167
 __sctp_connect+0x1e9d/0x1f20 net/sctp/socket.c:1226
 __sctp_setsockopt_connectx net/sctp/socket.c:1322 [inline]
 sctp_setsockopt_connectx_old net/sctp/socket.c:1338 [inline]
 sctp_setsockopt+0x960d/0x19090 net/sctp/socket.c:4647
 sock_common_setsockopt+0x13b/0x170 net/core/sock.c:3151
 __sys_setsockopt+0x7c3/0xa30 net/socket.c:2084
 __do_sys_setsockopt net/socket.c:2100 [inline]
 __se_sys_setsockopt+0xdd/0x100 net/socket.c:2097
 __x64_sys_setsockopt+0x62/0x80 net/socket.c:2097
 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7

Local variable description: ----addr.i@sctp_process_init
Variable was created at:
 sctp_process_param net/sctp/sm_make_chunk.c:2495 [inline]
 sctp_process_init+0x603/0x3e30 net/sctp/sm_make_chunk.c:2345
 sctp_process_param net/sctp/sm_make_chunk.c:2495 [inline]
 sctp_process_init+0x603/0x3e30 net/sctp/sm_make_chunk.c:2345
=====================================================

Crashes (567):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/11/21 14:45 https://github.com/google/kmsan.git master 3db92f3b3586 8098ea0f .config console log report syz ci-upstream-kmsan-gce
2020/01/08 13:34 https://github.com/google/kmsan.git master 997a8b55bc92 ddc3e859 .config console log report ci-upstream-kmsan-gce
2020/01/08 11:14 https://github.com/google/kmsan.git master 997a8b55bc92 6738e0b3 .config console log report ci-upstream-kmsan-gce
2020/01/08 10:07 https://github.com/google/kmsan.git master 997a8b55bc92 6738e0b3 .config console log report ci-upstream-kmsan-gce
2020/01/08 01:17 https://github.com/google/kmsan.git master 997a8b55bc92 6738e0b3 .config console log report ci-upstream-kmsan-gce
2020/01/07 11:45 https://github.com/google/kmsan.git master 997a8b55bc92 1bcd407e .config console log report ci-upstream-kmsan-gce
2020/01/06 20:55 https://github.com/google/kmsan.git master 997a8b55bc92 53430d97 .config console log report ci-upstream-kmsan-gce
2020/01/06 00:55 https://github.com/google/kmsan.git master 997a8b55bc92 438e1227 .config console log report ci-upstream-kmsan-gce
2020/01/05 19:25 https://github.com/google/kmsan.git master 997a8b55bc92 d646e21f .config console log report ci-upstream-kmsan-gce
2020/01/05 14:50 https://github.com/google/kmsan.git master 997a8b55bc92 d646e21f .config console log report ci-upstream-kmsan-gce
2020/01/05 12:35 https://github.com/google/kmsan.git master 997a8b55bc92 d646e21f .config console log report ci-upstream-kmsan-gce
2020/01/04 11:21 https://github.com/google/kmsan.git master 997a8b55bc92 68256974 .config console log report ci-upstream-kmsan-gce
2020/01/04 01:45 https://github.com/google/kmsan.git master 997a8b55bc92 68256974 .config console log report ci-upstream-kmsan-gce
2020/01/03 11:13 https://github.com/google/kmsan.git master 997a8b55bc92 9dcc1191 .config console log report ci-upstream-kmsan-gce
2019/12/31 13:02 https://github.com/google/kmsan.git master 997a8b55bc92 25a0186e .config console log report ci-upstream-kmsan-gce
2019/12/31 02:08 https://github.com/google/kmsan.git master 997a8b55bc92 7f117e28 .config console log report ci-upstream-kmsan-gce
2019/12/31 00:03 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/30 22:21 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/30 21:10 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/30 17:10 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/30 12:35 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/30 10:38 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/30 10:38 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/30 09:38 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/30 04:47 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/29 21:13 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/29 19:29 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/29 17:50 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/29 12:29 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/29 08:54 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/28 21:14 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/28 13:33 https://github.com/google/kmsan.git master 997a8b55bc92 af6b8ef8 .config console log report ci-upstream-kmsan-gce
2019/12/28 12:24 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/28 06:06 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/28 04:38 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/28 03:21 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/27 23:49 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/27 23:44 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/27 22:00 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/27 19:59 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/27 17:35 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/27 11:43 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/27 10:43 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/27 06:44 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/27 05:11 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/12/27 01:45 https://github.com/google/kmsan.git master 997a8b55bc92 be5c2c81 .config console log report ci-upstream-kmsan-gce
2019/11/20 21:26 https://github.com/google/kmsan.git master 3db92f3b3586 8098ea0f .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.