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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 188D3C433DB for ; Tue, 16 Mar 2021 16:03:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B6BA164FEA for ; Tue, 16 Mar 2021 16:03:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6BA164FEA Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 52E966B008C; Tue, 16 Mar 2021 12:03:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 505508D0002; Tue, 16 Mar 2021 12:03:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3CD708D0001; Tue, 16 Mar 2021 12:03:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0124.hostedemail.com [216.40.44.124]) by kanga.kvack.org (Postfix) with ESMTP id 212726B008C for ; Tue, 16 Mar 2021 12:03:31 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id CF874365C for ; Tue, 16 Mar 2021 16:03:30 +0000 (UTC) X-FDA: 77926207380.12.E64F07B Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by imf24.hostedemail.com (Postfix) with ESMTP id 04B26A001A98 for ; Tue, 16 Mar 2021 16:03:28 +0000 (UTC) Received: by mail-qk1-f169.google.com with SMTP id a9so35691495qkn.13 for ; Tue, 16 Mar 2021 09:03:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=beVxRTMBMXPpmNrXHLYtJs0EbkQrNYHRKHyxRcHuRb4=; b=awxSxSy4uwWFzbkMD8sxKddEysDquay9biMF9KhoimOyTg8rI0A8N5JMTqSAw9ZWC3 bOIkkGLySwlBbw4sHieL3iZ9itgC0ILzj/+70qwyNrBE7dyRSGHbsoIqvTyW3E3FgoQd gM1tVxMpX6uBYFUNcK996RWmBRyTYkj7MajWME1b9WtW7np9uaWXjQ3MqLplAmG9i4H4 FM5681UjVflvNnSWkR3dkwtXrikrXvnjYWf0S34mOGWz3B9AWXwP5W/JVIYvITwD5txy e58n/1O7tqNlBZZM7BefWdolZdlEkCU/672p5RfJFUJ93iUAjQ0OHGrMm8hE2UeJugh2 sMGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=beVxRTMBMXPpmNrXHLYtJs0EbkQrNYHRKHyxRcHuRb4=; b=R8HCnisXBkKulciSp8UxBm65Q4toyCvBGtMWi/pQOzmWRYEmbwEiKF+5ZOqGwRShON Uhb9QMoKnJjFZy4hpVDxZTF40rUHVtqzh0VkV9lF3XpAyPTPSkip1okVyHhSGyW1X17C ZVb1eCGMyQDaYXP+OQTEKJRubYw65Rk/uVY2sxyreJK6ehM4QWCx2fni6ifDZUKORXsD NeyYix7rca56SxX4+HlaRCTaNQORqYjKyY7m69BkjPmbfV0OOhw19Lp/7AMFl1EkW2wY XNXlF9BbNddvy6GY+5mrUllB4JjcW1NumQXCT3VdUvG7C4bMeKtAWfMn51lbltb4+Nur 0RxA== X-Gm-Message-State: AOAM533ImQLgKsedeCWqsLfk0AkFFLnbpUzvr85eXRO829/GX44a1oYb hTj7EHr8URT4ib8VNxFVqqcyhwrKnpruRBi0JHSkyQ== X-Google-Smtp-Source: ABdhPJyHqFKybJ5rQin3MWnJ3Of9cFOqQpCXXsc44QzH+iUoekUd1pC6hQAeTOhuPETNmLlxujDVr3AMkVf/HKwAzh4= X-Received: by 2002:a05:620a:981:: with SMTP id x1mr225906qkx.501.1615910607811; Tue, 16 Mar 2021 09:03:27 -0700 (PDT) MIME-Version: 1.0 References: <00000000000069802205bda22b7f@google.com> <20210316155102.GP1463@shell.armlinux.org.uk> In-Reply-To: <20210316155102.GP1463@shell.armlinux.org.uk> From: Dmitry Vyukov Date: Tue, 16 Mar 2021 17:03:16 +0100 Message-ID: Subject: Re: [syzbot] kernel panic: corrupted stack end in openat To: Russell King - ARM Linux admin Cc: Arnd Bergmann , syzbot , Linus Walleij , Linux ARM , Andrew Morton , LKML , Linux-MM , syzkaller-bugs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Stat-Signature: xfemhd6thc9az9te1q3bfecaewirxirw X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 04B26A001A98 Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf24; identity=mailfrom; envelope-from=""; helo=mail-qk1-f169.google.com; client-ip=209.85.222.169 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615910608-606610 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 4:51 PM Russell King - ARM Linux admin wrote: > > 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) > > > > 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. > > > > 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. > > > > 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? It's just a stock Debian-provided gcc. Which I would assume also just a plain gcc.