Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp421423ybg; Wed, 10 Jun 2020 04:26:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLJFa1ANSFkmF0SEch/GaZebB988d4ckUVNsxQIAujV6WEZZ/duWqPFNNZYhSEEqhfGhDa X-Received: by 2002:a17:906:f1d5:: with SMTP id gx21mr2970396ejb.416.1591788403290; Wed, 10 Jun 2020 04:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591788403; cv=none; d=google.com; s=arc-20160816; b=HuMGlM46Bw2pWO+JnvOzoMfTEKupbm0M9EAyYGoNuLLnnLeSfLg74VgdwfT7jznIxy q7oQ6g7XtFp9Qz7gZBDcaxDEc8ODwF6GorgNXANz0DqnGTThHM2v/TrK69J6tHgNAHUn D7c1TdiSdZ3J//6fukAVHTHIbv+UjSyVIA463LYij30OhwcE2OMPUV/x3qEFE3WTqHoC PFzkocL7fswrnW9GgTcanhjDCg1i5qNY/5BDFcPUmT20l5Qdcd08n109WySwk59YHONN BO8bgEek66vM8qTaKf/JVISojKlv4aYOuAmxwI2vnTexmwxjhrPlt98oFKLQ/h/BoPTP SZKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:cc:from:references:to:subject; bh=UKjWWOytVEn7f4Z5NLqy9s5JqBA46D5UDEDZglaUyzk=; b=AOTibEGhGb9RZZWK6g4awmAdFbQJh9Z6/TVelAsYHcyhN9nAG9N52iH5aL3BZX47n/ srFo2IzFJwd3VNH7kEL0W4JrtGzKuu1lLJeQcB2htF+TyyvQpnHFdPx9K3EMZ5BBKcmF IiqSHEqyi3FybTEzFvkP16qYAcKb3yQ9mUZSjQLVg8/Ly3cpCNmfthglBYZYx2Q7bKHg LNZuf3dsdLCO9RkLc3BIEEuNl3Y6OGxd4JVEk55GK1Nq2Z0ZDNTNjcy/yxRe6QvlOh3J e6fcDNFElR0WDsZn377Iii2VzoSgeRLg+fqD8/OhWSme7wQ5ZZbZeAh6pjO0hcfbIHwx pgAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si12393125eji.455.2020.06.10.04.26.20; Wed, 10 Jun 2020 04:26:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728480AbgFJLYE (ORCPT + 99 others); Wed, 10 Jun 2020 07:24:04 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:54116 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728322AbgFJLYE (ORCPT ); Wed, 10 Jun 2020 07:24:04 -0400 Received: from fsav401.sakura.ne.jp (fsav401.sakura.ne.jp [133.242.250.100]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 05ABNb8c049454; Wed, 10 Jun 2020 20:23:38 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav401.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav401.sakura.ne.jp); Wed, 10 Jun 2020 20:23:37 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav401.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 05ABNWVG049156 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 10 Jun 2020 20:23:37 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Subject: Re: general protection fault in proc_kill_sb To: viro@zeniv.linux.org.uk References: <0000000000002d7ca605a7b8b1c5@google.com> From: Tetsuo Handa Cc: syzbot , adobriyan@gmail.com, ebiederm@xmission.com, gladkov.alexey@gmail.com, keescook@chromium.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Message-ID: <10cd85a7-2958-57a8-aa7e-0075194fc788@I-love.SAKURA.ne.jp> Date: Wed, 10 Jun 2020 20:23:33 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <0000000000002d7ca605a7b8b1c5@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/06/10 19:56, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit: 7ae77150 Merge tag 'powerpc-5.8-1' of git://git.kernel.org.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=16e12212100000 > kernel config: https://syzkaller.appspot.com/x/.config?x=d195fe572fb15312 > dashboard link: https://syzkaller.appspot.com/bug?extid=4abac52934a48af5ff19 > compiler: gcc (GCC) 9.0.0 20181231 (experimental) > > Unfortunately, I don't have any reproducer for this crash yet. The report says proc_sb_info(sb) == NULL at proc_kill_sb() which was called via fs->kill_sb(s) from deactivate_locked_super(). The console log says that memory allocation for proc_sb_info(sb) failed due to memory allocation fault injection. [ 1492.052802][ T6840] FAULT_INJECTION: forcing a failure. [ 1492.052802][ T6840] name failslab, interval 1, probability 0, space 0, times 0 [ 1492.077153][ T6840] CPU: 0 PID: 6840 Comm: syz-executor.2 Not tainted 5.7.0-syzkaller #0 [ 1492.085449][ T6840] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 1492.095511][ T6840] Call Trace: [ 1492.098811][ T6840] dump_stack+0x188/0x20d [ 1492.103157][ T6840] should_fail.cold+0x5/0xa [ 1492.107686][ T6840] ? fault_create_debugfs_attr+0x140/0x140 [ 1492.107721][ T6840] ? idr_replace+0xee/0x160 [ 1492.127210][ T6840] should_failslab+0x5/0xf [ 1492.131638][ T6840] kmem_cache_alloc_trace+0x2d0/0x7d0 [ 1492.137020][ T6840] ? up_write+0x148/0x470 [ 1492.141367][ T6840] proc_fill_super+0x79/0x5c0 [ 1492.146052][ T6840] ? proc_parse_param+0x8a0/0x8a0 [ 1492.151092][ T6840] vfs_get_super+0x12e/0x2d0 [ 1492.155694][ T6840] vfs_get_tree+0x89/0x2f0 [ 1492.160126][ T6840] do_mount+0x1306/0x1b40 [ 1492.164467][ T6840] ? copy_mount_string+0x40/0x40 [ 1492.169411][ T6840] ? __might_fault+0x190/0x1d0 [ 1492.174188][ T6840] ? _copy_from_user+0x13c/0x1a0 [ 1492.179138][ T6840] ? memdup_user+0x7c/0xd0 [ 1492.183575][ T6840] __x64_sys_mount+0x18f/0x230 [ 1492.188351][ T6840] do_syscall_64+0xf6/0x7d0 [ 1492.192861][ T6840] entry_SYSCALL_64_after_hwframe+0x49/0xb3 [ 1492.198759][ T6840] RIP: 0033:0x45ca69 That is, proc_kill_sb() was assuming "s->s_fs_info = fs_info;" is always called from proc_fill_super() which is called via fill_super(sb, fc); from vfs_get_super().