Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4446662pxf; Tue, 16 Mar 2021 13:47:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhl6VOcL1ruVKJ2tqYkAvrjuDo9RbMN7r6OmWNiMjLdeKn38qWcD0BW81J/85FkbnwNczB X-Received: by 2002:a17:906:405b:: with SMTP id y27mr32496258ejj.332.1615927660905; Tue, 16 Mar 2021 13:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615927660; cv=none; d=google.com; s=arc-20160816; b=qFdwzEUWJblHdmIfBBo+3KeTwSG9Gke8IxrwhfE36bNr9YpsB2gkL6FmfYMtVGeSdI cyPSUfL4FU/WiD4CfyI0teux32f1EMvsMJLRBlnT7iv3262ACTklAOgw5r9bE2ZvZw93 /cyQHWdywlUctN99sQfUow9RtaJsWNlaDIth0beh4e0MkE8AgwMzf/p4V5138HY90oLM x84nVyjGyOiDFjlDmQHrAIaTx1m1g4Xe6trcmWtP7KRyi2ahHgG5gClEXkmcD/554TVl fBgBSBUyxqtmac05ITxYw+SbjVYdsauaSbemnDVteKm7UNGvyUCWaPao+OR5xIXoIAiK utaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0x7tHwkCAch6coHUwoAB3iKvXa/LjrfJZbY/lbq9O0M=; b=O6AjEKh1jSSZncRwLmLNLL6ODevPG3kYiRiBbGYjkzucm9MZY0FK27LPxNObtvS0iu kxoXxN0XRD1bugLrst8uHAkJT4OcYjqZeroxHorPpplOdj+Yaqn7K9tPlrtW6csrpoJo 7SSJgIM9orL32/QbQeEzR3TDGFR3ohsipXyqeC0xACcan1njNOAIFi4QIzRsCQRMQS89 SJM4QdsMiO0+cV+o+2+JhgdehMWIsAQmqc0tEtTavi1Yi7NbJc1wHTmMLnkRuDER1Evd WxcyyMNql1s4ePOHL1kO5G678aZbvXRbvlCoEBkPU/tnZUZIa9uqFkZSGSC2IfrPPqNX IRmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=kgZuqLN6; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l1si14395553ejb.137.2021.03.16.13.47.18; Tue, 16 Mar 2021 13:47:40 -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; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=kgZuqLN6; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237557AbhCPPvy (ORCPT + 99 others); Tue, 16 Mar 2021 11:51:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237484AbhCPPvP (ORCPT ); Tue, 16 Mar 2021 11:51:15 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51043C06174A for ; Tue, 16 Mar 2021 08:51:09 -0700 (PDT) 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 Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King - ARM Linux admin Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 04:44:45PM +0100, Arnd Bergmann wrote: > On Tue, Mar 16, 2021 at 11:17 AM Dmitry Vyukov wrote: > > 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_calc_file_hash_tfm+0x178/0x228 security/integrity/ima/ima_crypto.c:484) > > > > > [<8073a78c>] (ima_calc_file_hash_tfm) from [<8073ae2c>] (ima_calc_file_shash security/integrity/ima/ima_crypto.c:515 [inline]) > > > > > [<8073a78c>] (ima_calc_file_hash_tfm) from [<8073ae2c>] (ima_calc_file_hash+0x124/0x8b8 security/integrity/ima/ima_crypto.c:572) > > > > > > ima_calc_file_hash_tfm() has a SHASH_DESC_ON_STACK(), which by itself 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 to it. > > > > The compiler is gcc version 10.2.1 20210110 (Debian 10.2.1-6) > > Ok, building with Ubuntu 10.2.1-1ubuntu1 20201207 locally, that's > the closest I have installed, and I think the Debian and Ubuntu versions > are generally quite close in case of gcc since they are maintained by > the same packagers. > > 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 > ‘ima_calc_field_array_hash_tfm’: > ../security/integrity/ima/ima_crypto.c:624:1: warning: the frame size > of 664 bytes is larger than 600 bytes [-Wframe-larger-than=] > none of the other functions from the call chain have more than 600 bytes > in this combination of config/compiler/sourcetree. > > 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? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!