bisecting cause commit starting from d1fdb6d8f6a4109a4263176c84b899076a5f8008 building syzkaller on 0159583c3bcfe4ece6b839712327cd955aabee66 testing commit d1fdb6d8f6a4109a4263176c84b899076a5f8008 with gcc (GCC) 8.1.0 all runs: crashed: KASAN: use-after-free Read in mntput testing release v5.1 testing commit e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd with gcc (GCC) 8.1.0 all runs: OK # git bisect start d1fdb6d8f6a4109a4263176c84b899076a5f8008 v5.1 Bisecting: 7511 revisions left to test after this (roughly 13 steps) [f4d9a23d3dad0252f375901bf4ff6523a2c97241] sparc64: simplify reduce_memory() function testing commit f4d9a23d3dad0252f375901bf4ff6523a2c97241 with gcc (GCC) 8.1.0 all runs: OK # git bisect good f4d9a23d3dad0252f375901bf4ff6523a2c97241 Bisecting: 3765 revisions left to test after this (roughly 12 steps) [7e9890a3500d95c01511a4c45b7e7192dfa47ae2] Merge tag 'ovl-update-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs testing commit 7e9890a3500d95c01511a4c45b7e7192dfa47ae2 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 7e9890a3500d95c01511a4c45b7e7192dfa47ae2 Bisecting: 1890 revisions left to test after this (roughly 11 steps) [1d9d7cbf28a1c2f84f2a0224466f8eb5f0a62ace] Merge tag 'ceph-for-5.2-rc1' of git://github.com/ceph/ceph-client testing commit 1d9d7cbf28a1c2f84f2a0224466f8eb5f0a62ace with gcc (GCC) 8.1.0 all runs: OK # git bisect good 1d9d7cbf28a1c2f84f2a0224466f8eb5f0a62ace Bisecting: 942 revisions left to test after this (roughly 10 steps) [7fbc78e3155a0c464bd832efc07fb3c2355fe9bd] Merge tag 'for-linus-20190524' of git://git.kernel.dk/linux-block testing commit 7fbc78e3155a0c464bd832efc07fb3c2355fe9bd with gcc (GCC) 8.1.0 all runs: crashed: KASAN: use-after-free Read in mntput # git bisect bad 7fbc78e3155a0c464bd832efc07fb3c2355fe9bd Bisecting: 494 revisions left to test after this (roughly 9 steps) [a13f950ef13ff1eaf2ce14f5462ca59c4b60fdd0] Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip testing commit a13f950ef13ff1eaf2ce14f5462ca59c4b60fdd0 with gcc (GCC) 8.1.0 all runs: crashed: KASAN: use-after-free Read in mntput # git bisect bad a13f950ef13ff1eaf2ce14f5462ca59c4b60fdd0 Bisecting: 293 revisions left to test after this (roughly 8 steps) [c011d23ba046826ccf8c4a4a6c1d01c9ccaa1403] kvm: fix compilation on aarch64 testing commit c011d23ba046826ccf8c4a4a6c1d01c9ccaa1403 with gcc (GCC) 8.1.0 all runs: OK # git bisect good c011d23ba046826ccf8c4a4a6c1d01c9ccaa1403 Bisecting: 149 revisions left to test after this (roughly 7 steps) [0ef0fd351550130129bbdb77362488befd7b69d2] Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm testing commit 0ef0fd351550130129bbdb77362488befd7b69d2 with gcc (GCC) 8.1.0 all runs: crashed: KASAN: use-after-free Read in mntput # git bisect bad 0ef0fd351550130129bbdb77362488befd7b69d2 Bisecting: 78 revisions left to test after this (roughly 6 steps) [815d469d8c9a3360ee0a8b7857dd95352a6c7bde] Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux testing commit 815d469d8c9a3360ee0a8b7857dd95352a6c7bde with gcc (GCC) 8.1.0 all runs: OK # git bisect good 815d469d8c9a3360ee0a8b7857dd95352a6c7bde Bisecting: 39 revisions left to test after this (roughly 5 steps) [32fd90c407680935f84fb3ffc60fb3e020257d38] nvme: change locking for the per-subsystem controller list testing commit 32fd90c407680935f84fb3ffc60fb3e020257d38 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 32fd90c407680935f84fb3ffc60fb3e020257d38 Bisecting: 15 revisions left to test after this (roughly 4 steps) [80111bfb672d8c04d60c25559243554f732f2848] Merge tag 's390-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux testing commit 80111bfb672d8c04d60c25559243554f732f2848 with gcc (GCC) 8.1.0 all runs: crashed: KASAN: use-after-free Read in mntput # git bisect bad 80111bfb672d8c04d60c25559243554f732f2848 Bisecting: 12 revisions left to test after this (roughly 4 steps) [a6a4b66bd8f41922c543f7a820c66ed59c25995e] Merge tag 'for-linus-20190516' of git://git.kernel.dk/linux-block testing commit a6a4b66bd8f41922c543f7a820c66ed59c25995e with gcc (GCC) 8.1.0 all runs: OK # git bisect good a6a4b66bd8f41922c543f7a820c66ed59c25995e Bisecting: 6 revisions left to test after this (roughly 3 steps) [5a19d67027283c77f51b971485c3e579d94b5a2f] s390/qdio: use get_buf_state() in debug_get_buf_state() testing commit 5a19d67027283c77f51b971485c3e579d94b5a2f with gcc (GCC) 8.1.0 all runs: OK # git bisect good 5a19d67027283c77f51b971485c3e579d94b5a2f Bisecting: 3 revisions left to test after this (roughly 2 steps) [d8076bdb56af5e5918376cd1573a6b0007fc1a89] uapi: Wire up the mount API syscalls on non-x86 arches [ver #2] testing commit d8076bdb56af5e5918376cd1573a6b0007fc1a89 with gcc (GCC) 8.1.0 all runs: crashed: KASAN: use-after-free Read in mntput # git bisect bad d8076bdb56af5e5918376cd1573a6b0007fc1a89 Bisecting: 0 revisions left to test after this (roughly 1 step) [9c8ad7a2ff0bfe58f019ec0abc1fb965114dde7d] uapi, x86: Fix the syscall numbering of the mount API syscalls [ver #2] testing commit 9c8ad7a2ff0bfe58f019ec0abc1fb965114dde7d with gcc (GCC) 8.1.0 all runs: crashed: KASAN: use-after-free Read in mntput # git bisect bad 9c8ad7a2ff0bfe58f019ec0abc1fb965114dde7d Bisecting: 0 revisions left to test after this (roughly 0 steps) [1cdc415f10831c18912943017d06b2be948c67b4] uapi, fsopen: use square brackets around "fscontext" [ver #2] testing commit 1cdc415f10831c18912943017d06b2be948c67b4 with gcc (GCC) 8.1.0 all runs: OK # git bisect good 1cdc415f10831c18912943017d06b2be948c67b4 9c8ad7a2ff0bfe58f019ec0abc1fb965114dde7d is the first bad commit commit 9c8ad7a2ff0bfe58f019ec0abc1fb965114dde7d Author: David Howells Date: Thu May 16 12:52:27 2019 +0100 uapi, x86: Fix the syscall numbering of the mount API syscalls [ver #2] Fix the syscall numbering of the mount API syscalls so that the numbers match between i386 and x86_64 and that they're in the common numbering scheme space. Fixes: a07b20004793 ("vfs: syscall: Add open_tree(2) to reference or clone a mount") Fixes: 2db154b3ea8e ("vfs: syscall: Add move_mount(2) to move mounts around") Fixes: 24dcb3d90a1f ("vfs: syscall: Add fsopen() to prepare for superblock creation") Fixes: ecdab150fddb ("vfs: syscall: Add fsconfig() for configuring and managing a context") Fixes: 93766fbd2696 ("vfs: syscall: Add fsmount() to create a mount for a superblock") Fixes: cf3cba4a429b ("vfs: syscall: Add fspick() to select a superblock for reconfiguration") Reported-by: Arnd Bergmann Signed-off-by: David Howells Reviewed-by: Arnd Bergmann Signed-off-by: Al Viro :040000 040000 31ed689f1b143c8216f3f9356682cc73b47da320 0d339e04fa9a857fb19df4c06195073f8eb67173 M arch revisions tested: 17, total time: 4h11m6.73465653s (build: 1h34m47.300162518s, test: 2h31m25.024771074s) first bad commit: 9c8ad7a2ff0bfe58f019ec0abc1fb965114dde7d uapi, x86: Fix the syscall numbering of the mount API syscalls [ver #2] cc: ["arnd@arndb.de" "axboe@kernel.dk" "bp@alien8.de" "catalin.marinas@arm.com" "christian@brauner.io" "dhowells@redhat.com" "geert@linux-m68k.org" "hare@suse.com" "heiko.carstens@de.ibm.com" "hpa@zytor.com" "keescook@chromium.org" "linux-kernel@vger.kernel.org" "luto@kernel.org" "mingo@redhat.com" "tglx@linutronix.de" "viro@zeniv.linux.org.uk" "x86@kernel.org"] crash: KASAN: use-after-free Read in mntput ================================================================== BUG: KASAN: use-after-free in mntput+0x69/0x70 fs/namespace.c:1207 Read of size 4 at addr ffff88808c396724 by task syz-executor.0/7138 CPU: 1 PID: 7138 Comm: syz-executor.0 Not tainted 5.1.0+ #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+0x113/0x167 lib/dump_stack.c:113 print_address_description.cold.5+0x9/0x1ff mm/kasan/report.c:188 __kasan_report.cold.6+0x1b/0x39 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 mntput+0x69/0x70 fs/namespace.c:1207 path_put+0x4b/0x60 fs/namei.c:483 free_fs_struct+0x1d/0x60 fs/fs_struct.c:90 exit_fs+0xcc/0x100 fs/fs_struct.c:107 do_exit+0x9b0/0x2e80 kernel/exit.c:872 do_group_exit+0xf4/0x2f0 kernel/exit.c:980 get_signal+0x2e7/0x1840 kernel/signal.c:2577 do_signal+0x87/0x1940 arch/x86/kernel/signal.c:815 exit_to_usermode_loop+0x114/0x200 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:276 [inline] do_syscall_32_irqs_on arch/x86/entry/common.c:349 [inline] do_fast_syscall_32+0x8c0/0xae6 arch/x86/entry/common.c:405 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f68839 Code: Bad RIP value. RSP: 002b:00000000f7f6412c EFLAGS: 00000292 ORIG_RAX: 00000000000000f0 RAX: fffffffffffffe00 RBX: 000000000816af88 RCX: 0000000000000080 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000816af8c RBP: 00000000f7f64228 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 7138: save_stack+0x21/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc.constprop.8+0xc7/0xd0 mm/kasan/common.c:489 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:497 slab_post_alloc_hook mm/slab.h:437 [inline] slab_alloc mm/slab.c:3357 [inline] kmem_cache_alloc+0x11a/0x720 mm/slab.c:3519 kmem_cache_zalloc include/linux/slab.h:732 [inline] alloc_vfsmnt+0x21/0x710 fs/namespace.c:182 vfs_create_mount+0x8a/0x4b0 fs/namespace.c:961 __do_sys_fsmount fs/namespace.c:3423 [inline] __se_sys_fsmount fs/namespace.c:3340 [inline] __ia32_sys_fsmount+0x418/0xc60 fs/namespace.c:3340 do_syscall_32_irqs_on arch/x86/entry/common.c:334 [inline] do_fast_syscall_32+0x235/0xae6 arch/x86/entry/common.c:405 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 9: save_stack+0x21/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3463 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3729 free_vfsmnt+0x62/0x80 fs/namespace.c:559 delayed_free_vfsmnt+0xd/0x10 fs/namespace.c:564 __rcu_reclaim kernel/rcu/rcu.h:227 [inline] rcu_do_batch kernel/rcu/tree.c:2092 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2310 [inline] rcu_core+0x954/0x1350 kernel/rcu/tree.c:2291 __do_softirq+0x260/0x958 kernel/softirq.c:293 The buggy address belongs to the object at ffff88808c396600 which belongs to the cache mnt_cache of size 432 The buggy address is located 292 bytes inside of 432-byte region [ffff88808c396600, ffff88808c3967b0) The buggy address belongs to the page: page:ffffea000230e580 count:1 mapcount:0 mapping:ffff8880aa595ac0 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000230d7c8 ffffea00027f5b88 ffff8880aa595ac0 raw: 0000000000000000 ffff88808c396000 0000000100000008 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808c396600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808c396680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808c396700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808c396780: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff88808c396800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================