Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2884814rwb; Mon, 15 Aug 2022 13:17:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR5A5uooJy1LHKvmLTlviklzvxcchkfd43fi+hAZECgwy99UhFlsPKvBhbuBe7gQ5+jkUSVn X-Received: by 2002:a17:906:9b95:b0:733:5e1:b9a2 with SMTP id dd21-20020a1709069b9500b0073305e1b9a2mr11257855ejc.130.1660594639861; Mon, 15 Aug 2022 13:17:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594639; cv=none; d=google.com; s=arc-20160816; b=MACGG1pNLDcPJ050j+jeJXZFrrxJDzTApQP6VlkYT+hQ+xiIHprUFGSs9BzA9i4KYc xjJhModFvGA9IvuUJUL1lpPmhuxaLLrbcNzJe3w7CdPz3IhiDcxE4vVoUKIqcZDVJPBm jugHyx3az/DeJfS0pn7mBCzarz/jB8XMlbp6p/YkyD0xA8w6B/8oR0Q5+QCn3U6Qn5CT s9r9SzFKB6m30BXckZRaToF9a+RSMvDvKb7BFMgUVa2w7F4vn+sCEfk5FgZPFMthqMlf 0sV2fbxW23ISbsDoNwTQ23tIG7ihBosTRuYMrEWi2BlSXlwk5MFgjzUac50U7zNwr8Wa 0r4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GcrNBmy4B7oYPvzC1iQ3x9irNnquUnomstD6AlIWDjo=; b=YVEHbYPrO1OehKZp3Rgayd99eYSRH5SaBVX6yxV4cmWVhJ0WKQKaWQL5j5hrjOvpGv Q6QxQn0NcHSt2ck6METOAnD0nlwJam8l+dDAvce3ELRElSuyVKpVmM9RvjG/fXiYWt3Y 4juEUkogYkDhGRNFvA/w/umGApFjMbvTmCNLYbuPWKGiIrYZ8i/a/50dsn51U8GukTZl 6JZoZUqXOGQtucXZpYadqUbhtL/zIhzITelVWeA/1xtSMJpKv1/41FY0AvARg3DB6HN8 erkKIUUd7G1SrnDAx/Xd2Wjz3Elh4+YkwRmcGEWn8RaW8dE1Rt6vc9HyyOq9z+RW/WJC SHxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=mbnFdPKH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lc20-20020a170906f91400b0073124736ee8si7151025ejb.156.2022.08.15.13.16.54; Mon, 15 Aug 2022 13:17:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=mbnFdPKH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230503AbiHOSCd (ORCPT + 99 others); Mon, 15 Aug 2022 14:02:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233187AbiHOSCT (ORCPT ); Mon, 15 Aug 2022 14:02:19 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4709E25C43; Mon, 15 Aug 2022 11:02:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=GcrNBmy4B7oYPvzC1iQ3x9irNnquUnomstD6AlIWDjo=; b=mbnFdPKHRrDIndSjpd0B0OjzRe GQl31o3UikiEGn6BQe9miqqX9F802O9C06p1/OSyBKP51WOUacxGnUx7z4T6ckelwcCtMvcfR8mrK 5hlTPVvydm+RDOa9tDO1fR4GyEKa0taddTbbOtN5/DLk48AvbH65vleCk4EEsitm3rRsQJ7GinDca +MVUzc6eoN087h/COD/d3Eq28QKnb/gPmfW6dDXn2WMm++zYS6VfFmA4IuYw7kJRXaJvVMKKgpTB6 hl+hfewNBspeJQSXz/fNRpARhUvZzAJWJM8RAbwMeI7f2gU4yfGTRikkZem3Jys2K6TVQXNv/BNYI +TUm5M8A==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oNePm-004k5t-Qd; Mon, 15 Aug 2022 18:02:14 +0000 Date: Mon, 15 Aug 2022 19:02:14 +0100 From: Al Viro To: Jiacheng Xu <578001344xu@gmail.com> Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, konishi.ryusuke@gmail.com, linux-nilfs@vger.kernel.org, security@kernel.org Subject: Re: KASAN: use-after-free in nilfs_mdt_destroy Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 15, 2022 at 10:03:21PM +0800, Jiacheng Xu wrote: > Patch: > Fix this bug by moving the assignment of inode->i_private before > security_inode_alloc. > An ad-hoc patch is proposed: > https://patchwork.kernel.org/project/linux-fsdevel/patch/20211011030956.2459172-1-mudongliangabcd@gmail.com/ ... and that looks like utter bollocks. Why does security_inode_alloc() look at ->i_private? Which LSM is involved?