syzbot


KMSAN: uninit-value in mpol_rebind_task (2)

Status: fixed on 2023/02/24 13:50
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+217f792c92599518a2ab@syzkaller.appspotmail.com
Fix commit: 018160ad314d mm/mempolicy: fix uninit-value in mpol_rebind_policy()
First crash: 1063d, last: 892d
Discussions (9)
Title Replies (including bot) Last reply
[PATCH 5.18 000/158] 5.18.15-rc1 review 168 (168) 2022/07/29 15:29
[PATCH 5.10 000/105] 5.10.134-rc1 review 116 (116) 2022/07/29 15:01
[PATCH 5.4 00/87] 5.4.208-rc1 review 93 (93) 2022/07/28 22:58
[PATCH 4.19 00/62] 4.19.254-rc1 review 68 (68) 2022/07/28 22:58
[PATCH 4.14 00/37] 4.14.290-rc1 review 40 (40) 2022/07/28 22:57
[PATCH 4.9 00/26] 4.9.325-rc1 review 32 (32) 2022/07/28 22:57
[PATCH 5.15 000/201] 5.15.58-rc1 review 211 (211) 2022/07/28 14:39
[PATCH] mm/mempolicy: fix uninit-value in mpol_rebind_policy() 4 (4) 2022/05/18 08:52
[syzbot] KMSAN: uninit-value in mpol_rebind_task (2) 2 (3) 2022/01/07 13:54
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in mpol_rebind_task mm C 17 2067d 2136d 0/28 closed as invalid on 2021/12/14 11:42
Last patch testing requests (2)
Created Duration User Patch Repo Result
2022/05/12 03:49 20m wanngchenng@gmail.com patch https://github.com/google/kmsan.git master OK
2022/04/28 03:45 17m wanngchenng@gmail.com https://github.com/google/kmsan.git master report log

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in mpol_rebind_policy mm/mempolicy.c:352 [inline]
BUG: KMSAN: uninit-value in mpol_rebind_task+0x2ac/0x2c0 mm/mempolicy.c:368
 mpol_rebind_policy mm/mempolicy.c:352 [inline]
 mpol_rebind_task+0x2ac/0x2c0 mm/mempolicy.c:368
 cpuset_change_task_nodemask kernel/cgroup/cpuset.c:1711 [inline]
 cpuset_attach+0x787/0x15e0 kernel/cgroup/cpuset.c:2278
 cgroup_migrate_execute+0x1023/0x1d20 kernel/cgroup/cgroup.c:2515
 cgroup_migrate kernel/cgroup/cgroup.c:2771 [inline]
 cgroup_attach_task+0x540/0x8b0 kernel/cgroup/cgroup.c:2804
 __cgroup1_procs_write+0x5cc/0x7a0 kernel/cgroup/cgroup-v1.c:520
 cgroup1_tasks_write+0x94/0xb0 kernel/cgroup/cgroup-v1.c:539
 cgroup_file_write+0x4c2/0x9e0 kernel/cgroup/cgroup.c:3852
 kernfs_fop_write_iter+0x66a/0x9f0 fs/kernfs/file.c:296
 call_write_iter include/linux/fs.h:2162 [inline]
 new_sync_write fs/read_write.c:503 [inline]
 vfs_write+0x1318/0x2030 fs/read_write.c:590
 ksys_write+0x28b/0x510 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0xdb/0x120 fs/read_write.c:652
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Uninit was created at:
 slab_post_alloc_hook mm/slab.h:524 [inline]
 slab_alloc_node mm/slub.c:3251 [inline]
 slab_alloc mm/slub.c:3259 [inline]
 kmem_cache_alloc+0x902/0x11c0 mm/slub.c:3264
 mpol_new mm/mempolicy.c:293 [inline]
 do_set_mempolicy+0x421/0xb70 mm/mempolicy.c:853
 kernel_set_mempolicy mm/mempolicy.c:1504 [inline]
 __do_sys_set_mempolicy mm/mempolicy.c:1510 [inline]
 __se_sys_set_mempolicy+0x44c/0xb60 mm/mempolicy.c:1507
 __x64_sys_set_mempolicy+0xd8/0x110 mm/mempolicy.c:1507
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x54/0xd0 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x44/0xae

CPU: 1 PID: 3479 Comm: syz-executor124 Not tainted 5.16.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
=====================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/25 01:39 https://github.com/google/kmsan.git master 81c325bbf94e 6caa12e4 .config console log report syz C ci-upstream-kmsan-gce KMSAN: uninit-value in mpol_rebind_task
2022/06/13 17:11 https://github.com/google/kmsan.git master 2f3064574275 0d5abf15 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in mpol_rebind_task
2022/06/13 16:30 https://github.com/google/kmsan.git master 2f3064574275 0d5abf15 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in mpol_rebind_task
2022/06/13 13:41 https://github.com/google/kmsan.git master 2f3064574275 0d5abf15 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in mpol_rebind_task
2022/06/13 12:02 https://github.com/google/kmsan.git master 2f3064574275 0d5abf15 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in mpol_rebind_task
2022/04/12 01:56 https://github.com/google/kmsan.git master 33d9269ef6e0 af01ee7d .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in mpol_rebind_task
2021/12/25 00:13 https://github.com/google/kmsan.git master 81c325bbf94e 6caa12e4 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in mpol_rebind_task
* Struck through repros no longer work on HEAD.