Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1309354lqs; Sat, 15 Jun 2024 03:41:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXUfZB3ZnerKfrQsvM1D/Sm047VdZ267/1rLVYa4KQBlIx7Yvp2O9zuypewy6oujhrKPJwQ1eDw56i7cpoDjTv03/SNcZxrVm9kE2PwDA== X-Google-Smtp-Source: AGHT+IH18m44YOECqq4RUqL7exIzpxAkfSvZMerQKD1OVmzYZC5lIyrf6K6xvJHT2iazYH/GJocJ X-Received: by 2002:a17:90b:4f4b:b0:2c1:aa8e:d70 with SMTP id 98e67ed59e1d1-2c4da9c8de9mr5660377a91.0.1718448093081; Sat, 15 Jun 2024 03:41:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718448093; cv=pass; d=google.com; s=arc-20160816; b=UjUDznhjBQEQipVSdQ35pYTfgO3bxdZ24gGH8oK1wPKPrMhMv3fOjrD5/+c1SvFgJz s8SMukKRpDrPidguuMlLFgWBpRNF6JzBEnBC+Ai8w37leNaEfWCb4aYrR5cUguCme8yq H4uX+9iqg06yziJDsvcZ2xARDsjqJ9OKxA+SSlMlSNJgV8i6A59Ps15X57wEW2VA5B3i cSA8bXnJkaOjh+xZFAc4pEyaEU2geT6KDfYIEUv1QX1okxsZ6prnB9Tm58Zrve86ZOLD N0Bnn9toCIdFTKcGdI2/iXg9+VnKRpalgouNE9ujxuRjFxkyZ/45FUPZ4Zk++J2C2LRI KEgA== 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=7YGZ29vNVgD4YZtpudbjfB7qEm1ZnC+4oHeulzwLKDE=; fh=yaXYBe9sbkmvlk2mHY0QupCsCyiBqDs07jTvbP5wp9k=; b=JVl0OO/vzvVlbRK0hbLa5JHGozNYwx/R8RpC1wslA90X+psqDiy6YfChe/9AqLAHyF 6RrjIVD6MVjWPPU+eib4JIZ8Gs+JM/O51vIYxklqlQmFrxLlRLEv3OmIhBLJIrt05+7m pmXz6+jWAQMaG83aSfDGdueucxMK3532sj73bA5h+Q05tsN+kWkC5CMJDulydhNfZnUn LzDGlZ86KrKWRFQFnstFLNVEZpLIF34Dn1YvijOAU+X+PcqQtGrTPv0cSuh66IH3malu x2bSv+zW5/RlUx5v2dc11dltnTk19H/soBtdlkrMvkmbCoP3fBEp+MpKIRCSmvD3LlNl YQ7g==; 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-215837-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215837-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee4167aa1si5958794a12.498.2024.06.15.03.41.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 03:41:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215837-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-215837-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215837-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B366028431B for ; Sat, 15 Jun 2024 10:41:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 305212E62C; Sat, 15 Jun 2024 10:41:27 +0000 (UTC) Received: from mail114-241.sinamail.sina.com.cn (mail114-241.sinamail.sina.com.cn [218.30.114.241]) (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 1C23C2C184 for ; Sat, 15 Jun 2024 10:41:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.114.241 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718448086; cv=none; b=KMJVDpmcGMMXhQIVKIrn0AyLZJRbrJxzj4uKHhr7MdGUJQekRF9RGmRsiqi/7gpj8TkPu553DgZp2jfa3exBEe+VeqFCeFPRq9C8p1bKttttmOCOqK6umbWf6KsETbxvjpGmY2hNjv58q/HcMQrvgUgsc74WlaU4eq3baHEYKCc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718448086; c=relaxed/simple; bh=2L/UxNs+JPfdY3+lBiqtpmTCmTPryH5e6T5YlMjPlrg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OnYlzqdE/ji6mIKgLcDQjexcW99RcdZN3Uc+CtsKVpJUR+CSzw/aA2y0bqDwn6y++xJ3w3e+BXy/koLHp7csx02zYuWbIGBHSYnpMk3qSkk4awYWxdNM18JjT28StAOliKJzhcXriQ/LvENMCTBRId6sHaam9Ct6XH6dAHSNGoc= 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.114.241 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)([113.118.64.228]) by sina.com (172.16.235.24) with ESMTP id 666D6FA40000727C; Sat, 15 Jun 2024 18:40:39 +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: 31296845089150 X-SMAIL-UIID: 86AA73506A32429EADD5C27462498E18-20240615-184039-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: Sat, 15 Jun 2024 16:33:50 +0800 Message-Id: <20240615083350.977-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 83a7eefedc9b --- x/fs/open.c +++ y/fs/open.c @@ -952,7 +952,11 @@ static int do_dentry_open(struct file *f if (!open) open = f->f_op->open; if (open) { + error = -ENODEV; + if (!atomic_inc_not_zero(&inode->i_count)) + goto cleanup_all; error = open(inode, f); + iput(inode); if (error) goto cleanup_all; } --