Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp659800pxa; Wed, 12 Aug 2020 10:24:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHxsEWp5VtAXYUoLEoC5dd9XLskGVyMLnjFwzqYW2nVRvtCWNoJF613FTAaPNeJS/ThL27 X-Received: by 2002:a05:6402:b87:: with SMTP id cf7mr937451edb.131.1597253071238; Wed, 12 Aug 2020 10:24:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597253071; cv=none; d=google.com; s=arc-20160816; b=S+E+sLMOw6HgEE2VxQaTdv71TuVNolalF7Xi7gx29lQUenVtm/NHbbTLExfdZbYkTK cm5FD0fqifmvPhnA0ihKAKV0bnyTJrMCG6GTJc+Q6exMJGUvwJgzp4Jr8gct37M4lig3 cw33wcdm539RX5TJBHW2RzVGPW+OuB26hPck7g6XygydX2YowFDxSFmyhNnz27MKACPA Q33LnuyFvuhD4EtzOYfF4Cu5Jy2LK+yakTZ7cqmrVgi7TE9f/ozwwIaW+MiZpxjMEP3S QrnfXnImBy3b5o1a3WPpraDj3rmV2F4yTI9alGhD/BGDDf6HLe0EofTjC9ku2QXEirz4 8HJQ== 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=b1/lSRDVVen4Akj0ArLSHpTeWWjBzyPT/lPcsGI8nVw=; b=Ouu5CVfpkPDMwVib8HaJUzD/ppiDD5yV+vGlSWqpTfl4uxtGe/g/JBYWQQ+B9muRwL dob9knERyQcqC8iomUJYcd1Ra/bX9u5UHWp9wVKMB4IHVFWPVc9gk+IN+251yuJ4fSaN YrpCqWeh0L/9/2FvKiZtQWZIjr1aroomELxPni7KTFPww9Wfq4bkl+QxPsy6Xeyisaw6 qhhds4lkXGMu3wySW6RhLOVZRBFJIMVU+cpnIPyqAesq/XmQ/PLZ/YSukYD4GF/PBNRP +85NfYId/sADeXGIiFTndHaVPoyzmBKqe3BdZaj9KRp4lAzM+Yzljb1fREnot81LgRQG hvlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dFJ4Hzkp; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zh8si1782149ejb.475.2020.08.12.10.24.07; Wed, 12 Aug 2020 10:24:31 -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=pass header.i=@gmail.com header.s=20161025 header.b=dFJ4Hzkp; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726506AbgHLRXj (ORCPT + 99 others); Wed, 12 Aug 2020 13:23:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725993AbgHLRXi (ORCPT ); Wed, 12 Aug 2020 13:23:38 -0400 Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B060C061383; Wed, 12 Aug 2020 10:23:38 -0700 (PDT) Received: by mail-qt1-x841.google.com with SMTP id b25so2096384qto.2; Wed, 12 Aug 2020 10:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=b1/lSRDVVen4Akj0ArLSHpTeWWjBzyPT/lPcsGI8nVw=; b=dFJ4Hzkpz3+oD1F3BYZ++5nv2ELEguPwduttYcpO1TmDrzJuM9Ax88Q79LrVI8bY5T ztlS80pGOR3RNeVGI+aJwJVw/s6i3L7vzx2gpE8EqA0TBKcfIwNMlH7RgMxGbN9W7+kl 0YiS7cWhlEEfudI/HDdLT8nnRL7SdDmV2bhMP2cDGc3UKjou0/0dfmbqmgdibZaO3wU0 9jMJ/97QpQJURODplJipq3Oo6vOsr5Fv8Sj9yJtLoTXX2i2PNpzJrU+gDXxm9o/drWMZ XcVA0E1RwH8ce3jYImuE6NWeigHLURnv7ZdNqGUMQdyWYQ5Jxqkf5lil3GiOvTVlsSLA kIUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=b1/lSRDVVen4Akj0ArLSHpTeWWjBzyPT/lPcsGI8nVw=; b=UhT8Xr3y4FbRhsWXfcysmEOs3sNtYIOb8Qfk4AnjfeTxojFG5DTXLqRIhVDuKGfbQP ogQvJEVtnk2VQK/oZGWyz/py9o7Zn4P0QlyXhg2wt0VapThdNcC/YtxGtQnqkkcNcGGE I5rrOxMRBkwJn+7qJ0T+zA7H1LcDNGce8bHvYoqTY3nbOdYDojYZqYrI09cWsKYVSaWO kpY1y5arDuMPCnDq9ladrR+4RllJMmpN9yvqBKFwJd2h9JaiX9J9yptCFeGOfKUikPmC IBJm+UnbroODNsA/H7hsWInmw89P0UZgM5GoLzmRVauwnJ0fTKzU/ER1yEpNTUalptEh 7XYQ== X-Gm-Message-State: AOAM533aImqqPGnoBtDkcUknHvTbpp5ovR1/g+6TjeFmP1Vv4ZW/FF/W LGqN5ZxRdm38VmZ/NM26Jw== X-Received: by 2002:ac8:7152:: with SMTP id h18mr756292qtp.44.1597253017585; Wed, 12 Aug 2020 10:23:37 -0700 (PDT) Received: from PWN (146-115-88-66.s3894.c3-0.sbo-ubr1.sbo.ma.cable.rcncustomer.com. [146.115.88.66]) by smtp.gmail.com with ESMTPSA id i14sm3140849qtq.33.2020.08.12.10.23.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2020 10:23:37 -0700 (PDT) Date: Wed, 12 Aug 2020 13:23:35 -0400 From: Peilin Ye To: Dan Carpenter Cc: Greg Kroah-Hartman , linux-fsdevel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH] hfs, hfsplus: Fix NULL pointer dereference in hfs_find_init() Message-ID: <20200812172335.GA897567@PWN> References: <20200812065556.869508-1-yepeilin.cs@gmail.com> <20200812070827.GA1304640@kroah.com> <20200812071306.GA869606@PWN> <20200812085904.GA16441@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200812085904.GA16441@kadam> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 12, 2020 at 11:59:04AM +0300, Dan Carpenter wrote: > Yeah, the patch doesn't work at all. I looked at one call tree and it > is: > > hfs_mdb_get() tries to allocate HFS_SB(sb)->ext_tree. > > HFS_SB(sb)->ext_tree = hfs_btree_open(sb, HFS_EXT_CNID, hfs_ext_keycmp); > ^^^^^^^^ > > hfs_btree_open() calls page = read_mapping_page(mapping, 0, NULL); > read_mapping_page() calls mapping->a_ops->readpage() which leads to > hfs_readpage() which leads to hfs_ext_read_extent() which calls > res = hfs_find_init(HFS_SB(inode->i_sb)->ext_tree, &fd); > ^^^^^^^^ Thank you for pointing this out! I will try to come up with a better way to fix it. Peilin Ye > So we need ->ext_tree to be non-NULL before we can set ->ext_tree to be > non-NULL... :/ > > I wonder how long this has been broken and if we should just delete the > AFS file system. > > regards, > dan carpenter >