From nobody Fri Oct 3 10:13:37 2025 Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) (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 A66752E6CB4; Tue, 2 Sep 2025 10:44:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.181.97.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756809889; cv=none; b=GbSMcdHxuFyDwuBuvRcUDbykn2BElrls4ST4jHzm/UmlnWHj3kdvDLTCyblVILOkFsNskawnp1BNqPRQbIE/6eFbBtCKeXqhmri8bkn5VNCnE+/LeJlA23g8ZMnLlXN13+aYxjHBY9LgUPo9eeaEio/BnpVUkMEDWccGPEBpRfA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756809889; c=relaxed/simple; bh=fae+KqWjYaUUScNbAnLVX6DkXcGNfhfMm3lO0JME29Y=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=U/7vkMrZpi+XTWn3odzc8EiRUdISVEUx15yIMWROd27i3ITBRpAPdjDUJgkbnLDKmnWKKAemi3Tby/bJsmTTh0fdXIDcTH+q5oWykHAkvt72wgvKcuXW0Lsgi36zIAO9wQDQl5yO1G1+p8owkiPYgYG1awXBBM5sATWpIh74sxA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=I-love.SAKURA.ne.jp; spf=pass smtp.mailfrom=I-love.SAKURA.ne.jp; arc=none smtp.client-ip=202.181.97.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=I-love.SAKURA.ne.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=I-love.SAKURA.ne.jp Received: from www262.sakura.ne.jp (localhost [127.0.0.1]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 582AhUF7059653; Tue, 2 Sep 2025 19:43:30 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from [192.168.1.10] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 582AhO79059639 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Tue, 2 Sep 2025 19:43:29 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <378c991b-cacf-4693-9823-0bf07f5f03f8@I-love.SAKURA.ne.jp> Date: Tue, 2 Sep 2025 19:43:24 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [PATCH] ntfs3: pretend $Extend records as regular files From: Tetsuo Handa To: Konstantin Komarov , ntfs3@lists.linux.dev Cc: Alexander Viro , Jan Kara , Mateusz Guzik , linux-fsdevel , LKML , Christian Brauner References: <20250811-geteilt-sprudeln-f09e6ec25c0c@brauner> Content-Language: en-US In-Reply-To: Content-Transfer-Encoding: quoted-printable X-Anti-Virus-Server: fsav305.rs.sakura.ne.jp X-Virus-Status: clean Content-Type: text/plain; charset="utf-8" Since commit af153bb63a33 ("vfs: catch invalid modes in may_open()") requires any inode be one of S_IFDIR/S_IFLNK/S_IFREG/S_IFCHR/S_IFBLK/ S_IFIFO/S_IFSOCK type, use S_IFREG for $Extend records. Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=3D895c23f6917da440ed0d Signed-off-by: Tetsuo Handa --- fs/ntfs3/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index 37cbbee7fa58..b08b00912165 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -471,6 +471,7 @@ static struct inode *ntfs_read_mft(struct inode *inode, fname->home.seq =3D=3D cpu_to_le16(MFT_REC_EXTEND)) { /* Records in $Extend are not a files or general directories. */ inode->i_op =3D &ntfs_file_inode_operations; + mode =3D S_IFREG; } else { err =3D -EINVAL; goto out; --=20 2.51.0