syzbot


KMSAN: kernel-infoleak in move_addr_to_user (4)

Status: fixed on 2021/03/10 01:48
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+057884e2f453e8afebc8@syzkaller.appspotmail.com
Fix commit: b42b3a2744b3 can: isotp: isotp_getname(): fix kernel information leak
First crash: 1416d, last: 1360d
Discussions (5)
Title Replies (including bot) Last reply
[PATCH 5.10 000/103] 5.10.8-rc1 review 116 (116) 2021/01/18 09:29
pull-request: can 2021-01-13 4 (4) 2021/01/14 03:10
[PATCH v2] can: isotp: fix isotp_getname() leak 2 (2) 2021/01/12 09:22
[PATCH] can: isotp: fix isotp_getname() leak 3 (3) 2021/01/12 09:17
KMSAN: kernel-infoleak in move_addr_to_user (4) 3 (4) 2021/01/12 09:12
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: kernel-infoleak in move_addr_to_user (3) net C 79 1528d 1562d 15/28 fixed on 2020/09/28 09:09
upstream KMSAN: kernel-infoleak in move_addr_to_user (2) net C 8 2067d 2082d 11/28 fixed on 2019/03/28 12:00
upstream KMSAN: kernel-infoleak in move_addr_to_user (7) net C 8 4d16h 61d 0/28 upstream: reported C repro on 2024/09/22 17:46
upstream KMSAN: kernel-infoleak in move_addr_to_user (5) tipc 3 1209d 1351d 20/28 fixed on 2021/11/10 00:50
upstream KMSAN: kernel-infoleak in move_addr_to_user net 5 2095d 2145d 11/28 fixed on 2019/03/06 07:43
upstream KMSAN: kernel-infoleak in move_addr_to_user (6) tipc C 4 1030d 1068d 20/28 fixed on 2022/03/08 16:11

Sample crash report:
=====================================================
BUG: KMSAN: kernel-infoleak in kmsan_copy_to_user+0x9c/0xb0 mm/kmsan/kmsan_hooks.c:249
CPU: 0 PID: 8245 Comm: syz-executor868 Not tainted 5.10.0-rc4-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+0x21c/0x280 lib/dump_stack.c:118
 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118
 kmsan_internal_check_memory+0x202/0x520 mm/kmsan/kmsan.c:402
 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+0x1af/0x270 lib/usercopy.c:33
 copy_to_user include/linux/uaccess.h:209 [inline]
 move_addr_to_user+0x3a2/0x640 net/socket.c:237
 __sys_getsockname+0x407/0x5d0 net/socket.c:1906
 __do_sys_getsockname net/socket.c:1917 [inline]
 __se_sys_getsockname+0x91/0xb0 net/socket.c:1914
 __x64_sys_getsockname+0x4a/0x70 net/socket.c:1914
 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x441219
Code: e8 fc ab 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 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 1b 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffe3c24eaf8 EFLAGS: 00000246 ORIG_RAX: 0000000000000033
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441219
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 0000000000000003
RBP: 00000000006cb018 R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000401fc0
R13: 0000000000402050 R14: 0000000000000000 R15: 0000000000000000

Local variable ----address@__sys_getsockname created at:
 __sys_getsockname+0x91/0x5d0 net/socket.c:1891
 __sys_getsockname+0x91/0x5d0 net/socket.c:1891

Bytes 2-3 of 20 are uninitialized
Memory access of size 20 starts at ffff888124bbbdf0
Data copied to user address 0000000020000100
=====================================================

Crashes (59):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/01/06 10:09 https://github.com/google/kmsan.git master 73d62e81b476 b1c228e1 .config console log report syz C ci-upstream-kmsan-gce
2021/03/03 10:20 https://github.com/google/kmsan.git master 29ad81a1074a e5b64d68 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/11 14:02 https://github.com/google/kmsan.git master 73d62e81b476 a52ee10a .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/11 07:14 https://github.com/google/kmsan.git master 73d62e81b476 a52ee10a .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/10 14:49 https://github.com/google/kmsan.git master 73d62e81b476 2bd9619f .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/08 17:15 https://github.com/google/kmsan.git master 73d62e81b476 2ce644fc .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/08 15:55 https://github.com/google/kmsan.git master 73d62e81b476 2ce644fc .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/08 11:27 https://github.com/google/kmsan.git master 73d62e81b476 2ce644fc .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/07 22:31 https://github.com/google/kmsan.git master 73d62e81b476 2ce644fc .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/07 02:58 https://github.com/google/kmsan.git master 73d62e81b476 0655e081 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/06 06:44 https://github.com/google/kmsan.git master 73d62e81b476 23a562df .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/06 03:47 https://github.com/google/kmsan.git master 73d62e81b476 23a562df .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/05 10:28 https://github.com/google/kmsan.git master 73d62e81b476 23a562df .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/05 02:41 https://github.com/google/kmsan.git master 73d62e81b476 23a562df .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/04 04:25 https://github.com/google/kmsan.git master 73d62e81b476 624dad51 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/02 23:51 https://github.com/google/kmsan.git master 73d62e81b476 624dad51 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/01 07:08 https://github.com/google/kmsan.git master 73d62e81b476 fc9fd31e .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/01/30 05:54 https://github.com/google/kmsan.git master 73d62e81b476 fc9fd31e .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/01/27 13:45 https://github.com/google/kmsan.git master 73d62e81b476 a0ebf917 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/01/27 12:32 https://github.com/google/kmsan.git master 73d62e81b476 a0ebf917 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/01/27 07:19 https://github.com/google/kmsan.git master 73d62e81b476 55a7d4df .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/01/25 19:38 https://github.com/google/kmsan.git master 73d62e81b476 52e37319 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/01/24 15:48 https://github.com/google/kmsan.git master 73d62e81b476 52e37319 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/01/20 05:40 https://github.com/google/kmsan.git master 73d62e81b476 63631df1 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/01/18 00:45 https://github.com/google/kmsan.git master 73d62e81b476 813be542 .config console log report info ci-upstream-kmsan-gce KMSAN: kernel-infoleak in move_addr_to_user
2021/02/10 17:22 https://github.com/google/kmsan.git master 73d62e81b476 2bd9619f .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/02/09 17:33 https://github.com/google/kmsan.git master 73d62e81b476 2bd9619f .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/02/08 10:12 https://github.com/google/kmsan.git master 73d62e81b476 2ce644fc .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/02/07 08:58 https://github.com/google/kmsan.git master 73d62e81b476 2ce644fc .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/02/07 04:53 https://github.com/google/kmsan.git master 73d62e81b476 0655e081 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/02/05 23:13 https://github.com/google/kmsan.git master 73d62e81b476 23a562df .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/02/05 06:52 https://github.com/google/kmsan.git master 73d62e81b476 23a562df .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/02/03 12:42 https://github.com/google/kmsan.git master 73d62e81b476 624dad51 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/02/01 06:35 https://github.com/google/kmsan.git master 73d62e81b476 fc9fd31e .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/01/24 21:07 https://github.com/google/kmsan.git master 73d62e81b476 52e37319 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/01/24 10:51 https://github.com/google/kmsan.git master 73d62e81b476 52e37319 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/01/20 04:06 https://github.com/google/kmsan.git master 73d62e81b476 63631df1 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/01/19 21:56 https://github.com/google/kmsan.git master 73d62e81b476 63631df1 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/01/19 13:47 https://github.com/google/kmsan.git master 73d62e81b476 63631df1 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: kernel-infoleak in move_addr_to_user
2021/01/15 13:33 https://github.com/google/kmsan.git master 73d62e81b476 65a7a854 .config console log report info ci-upstream-kmsan-gce
2021/01/15 00:04 https://github.com/google/kmsan.git master 73d62e81b476 65a7a854 .config console log report info ci-upstream-kmsan-gce
2021/01/13 07:42 https://github.com/google/kmsan.git master 73d62e81b476 0cdd6185 .config console log report info ci-upstream-kmsan-gce
2021/01/13 07:12 https://github.com/google/kmsan.git master 73d62e81b476 0cdd6185 .config console log report info ci-upstream-kmsan-gce
2021/01/11 14:29 https://github.com/google/kmsan.git master 73d62e81b476 2c1f2513 .config console log report info ci-upstream-kmsan-gce
2021/01/10 18:09 https://github.com/google/kmsan.git master 73d62e81b476 2c1f2513 .config console log report info ci-upstream-kmsan-gce
2021/01/06 08:13 https://github.com/google/kmsan.git master 73d62e81b476 b1c228e1 .config console log report info ci-upstream-kmsan-gce
2021/01/17 05:51 https://github.com/google/kmsan.git master 73d62e81b476 65a7a854 .config console log report info ci-upstream-kmsan-gce-386
2021/01/16 14:04 https://github.com/google/kmsan.git master 73d62e81b476 65a7a854 .config console log report info ci-upstream-kmsan-gce-386
2021/01/16 01:56 https://github.com/google/kmsan.git master 73d62e81b476 65a7a854 .config console log report info ci-upstream-kmsan-gce-386
2021/01/15 13:44 https://github.com/google/kmsan.git master 73d62e81b476 65a7a854 .config console log report info ci-upstream-kmsan-gce-386
2021/01/15 00:04 https://github.com/google/kmsan.git master 73d62e81b476 65a7a854 .config console log report info ci-upstream-kmsan-gce-386
2021/01/14 23:34 https://github.com/google/kmsan.git master 73d62e81b476 65a7a854 .config console log report info ci-upstream-kmsan-gce-386
2021/01/14 09:43 https://github.com/google/kmsan.git master 73d62e81b476 269d24e8 .config console log report info ci-upstream-kmsan-gce-386
2021/01/13 23:31 https://github.com/google/kmsan.git master 73d62e81b476 a945f0a3 .config console log report info ci-upstream-kmsan-gce-386
2021/01/13 16:01 https://github.com/google/kmsan.git master 73d62e81b476 a945f0a3 .config console log report info ci-upstream-kmsan-gce-386
2021/01/13 07:03 https://github.com/google/kmsan.git master 73d62e81b476 0cdd6185 .config console log report info ci-upstream-kmsan-gce-386
2021/01/08 23:50 https://github.com/google/kmsan.git master 73d62e81b476 c104d4a3 .config console log report info ci-upstream-kmsan-gce-386
* Struck through repros no longer work on HEAD.