Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp576045lqb; Wed, 29 May 2024 04:55:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVqG++N6QoaoU7EhLkZQgM6YIGq6uc2sR92vp2eL+qN98jv+LS+V5pPB2DYeuuU1Oot3m3g8adDN8SyvCTy4okrlAhf1M6i1WjohundFA== X-Google-Smtp-Source: AGHT+IF4eEY6SP3taSBTXCuXk6a3rPzjN49mbiWVHbknsg6RbFCYghAMrQ8Ag/hp0CuRgf4XjNvw X-Received: by 2002:a67:e454:0:b0:48b:8ff3:9ddd with SMTP id ada2fe7eead31-48b8ff39e19mr4976816137.34.1716983699673; Wed, 29 May 2024 04:54:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716983699; cv=pass; d=google.com; s=arc-20160816; b=pGRoWMpS15RMVlhSEWUs/+js9K7vKcQ2vjcGiArTEBUl1Ja32/TbNC8hBynt3LMIFG j26iLEDWCAb9WH9bgaY2KMxEBEM0GJChHpnIbP27VfA7hS5p9qYy/7GxOve4vdFrskFg rQNVODunrPk3wlXRpOiJU8GFqQKyxIMALBi35w7wiA0Yj08UrEyfE3J3cs2FQWvibVy7 XkKQ5R1ex1yXity64MsW+83GJR2gZ3IBegGeA1c1j9dPp0w7dkfK5PsRcD9WUz7Zg4qm xd0mKQ715j3/JwkzGUbXZscnzmZExbEkU4jS+0RTjC/bhxDDErQaOLkOYJbmRiaW5wqd 6hsg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=aOedHlO0TBHZ+Et5RUAQ/GIzLgqLtunS9oGoHmbvtNM=; fh=yaXYBe9sbkmvlk2mHY0QupCsCyiBqDs07jTvbP5wp9k=; b=lbTUBxZsddZ61WLmfWPHrXBX2Z6m+ILlvqdBHxx6+eaDFy95JnsdCqwZ1NhxCZXVeD KEYJ3S1IUIVe2+UJlySVY0l7q+ENoaYudiIqHD41bJMomWQu6qQpab+uBP7XFlnKwIRB phMtKs4v7pcD/PMqJUCPQqRL+dIJm9TJHpK4vwaGkDtEPVY7FzSLzq1bUWTbzy4dR6xU RsOcDEtLuIkb90oPu+cXDIruHsQ3sSVVyXnIQS0bcr6pXsALQhpV1ULDWNsAhxQeghcz scEsAeTHYApNZy1EW/+hillZNKMF9HbphQVtriBSdtuc/vsdx7EJsQnpiJ06irL16Mc0 ZIxA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-194043-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194043-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794abcc5a62si1214656585a.177.2024.05.29.04.54.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 04:54:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194043-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-194043-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194043-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5A4E61C23619 for ; Wed, 29 May 2024 11:54:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D929F180A60; Wed, 29 May 2024 11:54:53 +0000 (UTC) Received: from mail115-79.sinamail.sina.com.cn (mail115-79.sinamail.sina.com.cn [218.30.115.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A14511BC57 for ; Wed, 29 May 2024 11:54:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.79 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716983693; cv=none; b=pFiuCC/W8FbJVkYoOXhyfwixMvjR2sWYKg3Ev9TPDiy7WgRa9oRgYID5KAWaMegk2oz2eqkjQYZnk1sLuZuQpL2/NDM5tUxGclwvg4qVCjMLXXx32HD9EchFK3eaJodFrZ2FEdnjoO3u+9tGsCVy04Mb7xbRJuPgfIA3lUIR4b4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716983693; c=relaxed/simple; bh=6sV6W3xEzbKwzUUXOHrOWUHZ1xLmAfdGarqfQ6waobc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lnJtWs/zrke16PwXHC0CAXuR5j60tCBKEVaonHaSkLeGUyRMi+2+wfddadfjyek/+yBHFeNZOemx3vNRHwFtIGXh+I/zPrWrsXE3UGMEQ9gvQoNwEbCyhPe5Qgoy/TK64bRnkR7ciuR8UIAffc1rjqsX/RARbyWzKiOjGySNWtI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=218.30.115.79 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([116.24.9.5]) by sina.com (10.75.12.45) with ESMTP id 6657163C00004C34; Wed, 29 May 2024 19:49:18 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 66334531458002 X-SMAIL-UIID: 32EC0D550B704E8F8CDE9584ED7A08B1-20240529-194918-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [ntfs3?] KASAN: slab-use-after-free Read in chrdev_open Date: Wed, 29 May 2024 19:49:06 +0800 Message-Id: <20240529114906.2905-1-hdanton@sina.com> In-Reply-To: <000000000000f386f90616fea5ef@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master --- x/fs/open.c +++ y/fs/open.c @@ -906,9 +906,13 @@ static int do_dentry_open(struct file *f { static const struct file_operations empty_fops = {}; struct inode *inode = f->f_path.dentry->d_inode; + struct dentry *d = f->f_path.dentry; int error; + if (!lockref_get_not_zero(&d->d_lockref)) + return -ENODEV; path_get(&f->f_path); + dput(d); f->f_inode = inode; f->f_mapping = inode->i_mapping; f->f_wb_err = filemap_sample_wb_err(f->f_mapping); --