Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1689236lqs; Sat, 15 Jun 2024 23:33:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2S78TNvs27hNDbnjNoQL5DEBUdaR6yUcls5O90quFLzgTb/GP5IJlItM+Q4PlmEKSF2ssYjQMxAlUBE5fg1o2nPg3iR5kgE8pP3jrFQ== X-Google-Smtp-Source: AGHT+IFb0TmEV9HuaNtevvl4PSol1pxcLtKtzQtABpBYHTKdRJkVEpF1Y+DmCcOTIc2RCb3/i7qv X-Received: by 2002:aa7:da54:0:b0:57c:c0d6:c95f with SMTP id 4fb4d7f45d1cf-57cc0d7057bmr3951176a12.35.1718519633924; Sat, 15 Jun 2024 23:33:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718519633; cv=pass; d=google.com; s=arc-20160816; b=FiA2CPiCq8ifYhUXwbdael9LQvJVTspbdR7ggIwbzpcCpUI9YM5zx3By3siu/GYuzb 0guyhvwyuBS8VXSoPQWksH8zugJo/vZNmF8zcF1Bl9aZ6eLKVrYYlw8M4CJ5KsilS3qY 5ucW7GhC8h/hjl0gr+x1bQuIqOfNMG0V1+2ymvLpuwJhrNmwPInne54SzFpD6SSfVaDA pq3GO3B6O4BeyA4IDjnqjOCwA97bElEpXL9/ebHuINR8FqdvcN10Ql2d9wXFxUEv2fHf NqmcIat+1w8SJNazP5F5e7yoXDrya8ql5COdb7GPSUJMVKlj78AD8PraHaBoyUohUaq2 XjbA== 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=0o6X/PpZyOqu+1juEtM6bvlyNvX9tlQ+3pgE5QdMMjo=; fh=yaXYBe9sbkmvlk2mHY0QupCsCyiBqDs07jTvbP5wp9k=; b=ZPyJ0cTbrZcI00vOezhZZv6PR+3T78BFASPY3x1AtGzE9A1oIIU9df1TZsLw2SBBZ8 v5IMP+SZRiH+PflOa4e5ooK7SeHYCLCNoWwYADjBsVGgTEDdq9TqKSLHwjEFrF49Fx48 hubha61aE55WVAlHJmy5e7Ov4LhajLT8iGsM1SIRXBeZ1qVUtfgA2BJJNA+POk40N9b3 2nVxXaBE/w2h774PE54wIngQAZZtcAmdvpIlN11MfgPB9CTvDfk7PCpkg7mFHmS8zYhP T/yqWkZJ5ZmkqtIj3q6pRtzxaFn9Sdh7yI86zNH5ttQc1Gs4HaCu0cjPFF9gZk458ABJ lJjg==; 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-216146-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216146-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cd2a339cbsi849265a12.628.2024.06.15.23.33.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jun 2024 23:33:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-216146-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-216146-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216146-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7641B1F22FBE for ; Sun, 16 Jun 2024 06:33:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56932170830; Sun, 16 Jun 2024 06:33:18 +0000 (UTC) Received: from mail78-59.sinamail.sina.com.cn (mail78-59.sinamail.sina.com.cn [219.142.78.59]) (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 CC7BD16F0DD for ; Sun, 16 Jun 2024 06:33:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=219.142.78.59 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718519597; cv=none; b=XJJhIV5vdSzcnkVNleeHRNvOrVmsWlMoGgIfQJ3dCgMkbr8IiJDJ0jjrU/vDSUFdxUY6kTvIZ+deEkJmRfSXJSf1KfQ94u4RH9hidK4Nb8LhCXrp2JFdOzoQYrxcRwLsfi5YHrUa/E3optwwMvCn9qraj0fEybqN2WsDhZ8G8MQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718519597; c=relaxed/simple; bh=RkDUC72NplqItLpzX1fqE4SV2IKmpl2/vpxNEajZ7dc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hTNkHV8H62v8he0wJyWVfAVPp/Ca27slr54H7lAjSkv1LIfykv9ZrZ3lxQcBC0+/wGrEX6FhuEpZtx9egsfg0P3HLB6IMxDaPUcejs9n/TINMLpNUBCBgx9/kCjlLlmbYg3qwX53Q4M+U0SoBOv0vi8ypXcqNk9PFsrUgBc2FBQ= 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=219.142.78.59 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.2]) by sina.com (172.16.235.25) with ESMTP id 666E872200002C1C; Sun, 16 Jun 2024 14:33:08 +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: 55163934210318 X-SMAIL-UIID: 36CC5AC86D914D71A4F4F763510731BD-20240616-143308-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: Sun, 16 Jun 2024 14:32:56 +0800 Message-Id: <20240616063256.1356-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,6 +952,12 @@ static int do_dentry_open(struct file *f if (!open) open = f->f_op->open; if (open) { + struct mount *mnt = real_mount(f->f_path.mnt); + error = -ENODEV; + if (mnt->mnt.mnt_flags & MNT_DOOMED) + goto cleanup_all; + if (mnt_get_count(mnt) < 2) + goto cleanup_all; error = open(inode, f); if (error) goto cleanup_all; --