From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A600C433E0 for ; Tue, 16 Mar 2021 15:51:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8CCD4650FE for ; Tue, 16 Mar 2021 15:51:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8CCD4650FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2A3CE6B0087; Tue, 16 Mar 2021 11:51:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 22C966B0089; Tue, 16 Mar 2021 11:51:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0A7806B008A; Tue, 16 Mar 2021 11:51:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0197.hostedemail.com [216.40.44.197]) by kanga.kvack.org (Postfix) with ESMTP id DF3726B0087 for ; Tue, 16 Mar 2021 11:51:16 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 96C82180AD838 for ; Tue, 16 Mar 2021 15:51:16 +0000 (UTC) X-FDA: 77926176552.16.DCC98B1 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) by imf11.hostedemail.com (Postfix) with ESMTP id 6B21720053F8 for ; Tue, 16 Mar 2021 15:51:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0x7tHwkCAch6coHUwoAB3iKvXa/LjrfJZbY/lbq9O0M=; b=kgZuqLN6kffeuqFkpC8KhGiT0 qpol77Q7BRzHyKC02hrLQ9GjNk+sIEdh27SOsnYu5uKDg8kjl3Ki3M6MrS/QLh5SmbvOPSAUSJprH O3g2K5xgRHZ39f0pdRe4AE3iMEdw/M5Wkq0GnkntFMopTYvav36pfC5CC4zGOQ4ZA23aXP9aAfqiz H4hsEBKnnZg785gkRs/930B7NNAmirJHOE1d1t8MymgMYLMvoUVw0VQ9rHlj0Jw0HWeoWOh8xV4hP +cB03ub5/eDY8ICw1JTsdZGHVn+aw2Zv6zhjfb8VSSkdZ6VLC48FNNTJm+QkDvSv9Eb1m4b1yQ9TK +JTKPDVug==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:51374) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMByJ-0001VG-OE; Tue, 16 Mar 2021 15:51:03 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1lMByI-0006Mc-Ou; Tue, 16 Mar 2021 15:51:02 +0000 Date: Tue, 16 Mar 2021 15:51:02 +0000 From: Russell King - ARM Linux admin To: Arnd Bergmann Cc: Dmitry Vyukov , syzbot , Linus Walleij , Linux ARM , Andrew Morton , LKML , Linux-MM , syzkaller-bugs Subject: Re: [syzbot] kernel panic: corrupted stack end in openat Message-ID: <20210316155102.GP1463@shell.armlinux.org.uk> References: <00000000000069802205bda22b7f@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 6B21720053F8 X-Stat-Signature: h5jpbte7a1isnjnkpwtwy1798cdf37yt Received-SPF: none (armlinux.org.uk>: No applicable sender policy available) receiver=imf11; identity=mailfrom; envelope-from=""; helo=pandora.armlinux.org.uk; client-ip=78.32.30.218 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615909871-79845 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Mar 16, 2021 at 04:44:45PM +0100, Arnd Bergmann wrote: > On Tue, Mar 16, 2021 at 11:17 AM Dmitry Vyukov wro= te: > > On Tue, Mar 16, 2021 at 11:02 AM Arnd Bergmann wrote: > > > > On Tue, Mar 16, 2021 at 8:18 AM syzbot > > > > > > > [<8073772c>] (integrity_kernel_read) from [<8073a904>] (ima_cal= c_file_hash_tfm+0x178/0x228 security/integrity/ima/ima_crypto.c:484) > > > > > [<8073a78c>] (ima_calc_file_hash_tfm) from [<8073ae2c>] (ima_ca= lc_file_shash security/integrity/ima/ima_crypto.c:515 [inline]) > > > > > [<8073a78c>] (ima_calc_file_hash_tfm) from [<8073ae2c>] (ima_ca= lc_file_hash+0x124/0x8b8 security/integrity/ima/ima_crypto.c:572) > > > > > > ima_calc_file_hash_tfm() has a SHASH_DESC_ON_STACK(), which by itse= lf can > > > use up 512 bytes, but KASAN sometimes triples this number. However,= I see > > > you do not actually have KASAN enabled, so there is probably more t= o it. > > > > The compiler is gcc version 10.2.1 20210110 (Debian 10.2.1-6) >=20 > Ok, building with Ubuntu 10.2.1-1ubuntu1 20201207 locally, that's > the closest I have installed, and I think the Debian and Ubuntu version= s > are generally quite close in case of gcc since they are maintained by > the same packagers. >=20 > I see ima_calc_field_array_hash_tfm() shows up as one of the larger > stack users, but not alarmingly high: > ../security/integrity/ima/ima_crypto.c: In function > =E2=80=98ima_calc_field_array_hash_tfm=E2=80=99: > ../security/integrity/ima/ima_crypto.c:624:1: warning: the frame size > of 664 bytes is larger than 600 bytes [-Wframe-larger-than=3D] > none of the other functions from the call chain have more than 600 byte= s > in this combination of config/compiler/sourcetree. >=20 > In combination, I don't get to more than ~2300 bytes: ... which shouldn't be a problem - that's just over 1/4 of the stack space. Could it be the syzbot's gcc is doing something weird and inflating the stack frames? --=20 RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!