Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2994602lqt; Tue, 23 Apr 2024 07:44:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVCBtSOezzN9n2pRpEt9UXcydmJ1JdjkBUqHBHonbemaT8a6Vc0wfSiPkv4o2N16zg42gbycPgRu/Pyy2v/DeCgoZJOw3vZw+QAjwY1SA== X-Google-Smtp-Source: AGHT+IHcAnoaGN176+SmAt7SFGb49i6rkwtO3bgqd1riGfxZlfy0JP079ss6rYDijkXFr190wPIb X-Received: by 2002:a0c:f9cf:0:b0:6a0:84f8:6b85 with SMTP id j15-20020a0cf9cf000000b006a084f86b85mr5514747qvo.53.1713883454076; Tue, 23 Apr 2024 07:44:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713883454; cv=pass; d=google.com; s=arc-20160816; b=V/iz7j+7S3HNc6vP8vsRToAJbY8/vbdH8cak4C4DxvUgi5Jq6esBega5yRSc3rYK6h KNC7/1LKgxhv2Rzl2eAawFZpd4WJXelK7MxePNvImcdHHDjPgM8CSt2uM30/QzksaiTz 47/0WCaekqhO7py/R94NT7xu9yFaMM/C1r5oNDMsAL+ke3C5J1IwXi9yHENG4mj9IOf1 kz73rsq6zXAZRYeQxL5sJy19wGN/anxwQOFds7fmXj4myJbeP94xvUyAizllpX6Lyi5y VSSVTAw476pU2fDBqR0ig49oOleyIAnQ6+3lBbT9pM8V6IsKkmWZcQ3Ml54pt18i71Ow +WIg== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=GXL3SuBTg6ZAty/153VtafEhziwahLcJ1d1KPZtrhV8=; fh=WbG3pQqgOFrOjaCQjXklD+sM2SbjIExJnW8sLHLu1DM=; b=M6/EaQetRchUvcLba7mKZGFBu7ex0QQ3eng/kQvQ2i8S78EolTI+8aMlGcDNY3d6kT sunAY1UTUlK+MgbI44mv9nMPCW5tSd4hAvT2LnLfpVnhTGl2giWpSvaAJhpy6hrEgE81 dCUt2uly9DrNfwvb2F0aW+e6bZ7HkB274NAWDDBjk0wmiK370+Csii3vEIwRvY4ERqWU D5w+eZ0ORYDm4+tqwoHwzFqALkG7rkPU4TA0roQSHiSFPqkf4SmX8CBNUmbvA3mUwBFN K7Pt9onrK9OxFB5W/cRkaA83jVQuwgeFjSDJwuG26W6zoWg6yNhXJjNB7KuMg0eH03va R/3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@paragon-software.com header.s=mail header.b=HibwSwcl; arc=pass (i=1 spf=pass spfdomain=paragon-software.com dkim=pass dkdomain=paragon-software.com dmarc=pass fromdomain=paragon-software.com); spf=pass (google.com: domain of linux-kernel+bounces-155392-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155392-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q1-20020a056214194100b0069b4f599635si13559454qvk.231.2024.04.23.07.44.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 07:44:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155392-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; dkim=pass header.i=@paragon-software.com header.s=mail header.b=HibwSwcl; arc=pass (i=1 spf=pass spfdomain=paragon-software.com dkim=pass dkdomain=paragon-software.com dmarc=pass fromdomain=paragon-software.com); spf=pass (google.com: domain of linux-kernel+bounces-155392-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155392-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=paragon-software.com 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 C80D11C21D36 for ; Tue, 23 Apr 2024 14:44:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5E1513BAF6; Tue, 23 Apr 2024 14:43:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=paragon-software.com header.i=@paragon-software.com header.b="HibwSwcl" Received: from relayaws-01.paragon-software.com (relayaws-01.paragon-software.com [35.157.23.187]) (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 BEAC613B5BD; Tue, 23 Apr 2024 14:43:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=35.157.23.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713883429; cv=none; b=XcEv/XoOdU07Eom5mK4qhKlvWQsaKCpCkdc6C1cMOzCwL5nZ3J5PooxiumabvMfLFO+EvkK2sllf05BBiO8I0aM/6BVERUm6CqYgVk5LYUMcTn0vTavqKd5owvCx4qMPput51nl64rBPyzRX3gMeVuC2ITl/t99CmAmSjzv0KG4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713883429; c=relaxed/simple; bh=XjKJ9cLPbWFBOZsNXXBPcqV1Ya2McS+Q6Xy1f/KErb4=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=prYQEmsrQ1SO4kwurutUyFCaWofvIZZv0f4NNrjDdHHXwOk7PFh+ELosXZvGkGlTOg0Jg7rJSktW1cDwZaLpAmuXDJjPsW2+JV8YgigeQ7BJNZKfJiPhzeSrnaUkA8ZUgZhIztk0raFes5c+Qe/uf11UwyaZaUwd3JN42P8E0LA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=paragon-software.com; spf=pass smtp.mailfrom=paragon-software.com; dkim=pass (1024-bit key) header.d=paragon-software.com header.i=@paragon-software.com header.b=HibwSwcl; arc=none smtp.client-ip=35.157.23.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=paragon-software.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paragon-software.com Received: from dlg2.mail.paragon-software.com (vdlg-exch-02.paragon-software.com [172.30.1.105]) by relayaws-01.paragon-software.com (Postfix) with ESMTPS id DED952157; Tue, 23 Apr 2024 14:36:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paragon-software.com; s=mail; t=1713882973; bh=GXL3SuBTg6ZAty/153VtafEhziwahLcJ1d1KPZtrhV8=; h=From:To:CC:Subject:Date; b=HibwSwclvfzATE1ZEDcDLEJYjfTqDbxR/4/MfXUsakjGbpnr5bNoWPk//0Rd41j2E tyIVRPpfyY43+wjFUnXmIHm25ZV6CVncxqC62wcq5SkRJzPc250uEA5YJGrbqiDKmO 4hJ1xZV2v6DbeaAUHWNZ3ZMNP6xNNBNDAwMahF2s= Received: from ntfs3vm.paragon-software.com (192.168.211.186) by vdlg-exch-02.paragon-software.com (172.30.1.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Tue, 23 Apr 2024 17:43:45 +0300 From: Konstantin Komarov To: CC: , , Konstantin Komarov , Subject: [PATCH] fs/ntfs3: Break dir enumeration if directory contents error Date: Tue, 23 Apr 2024 17:41:55 +0300 Message-ID: <20240423144155.10219-2-almaz.alexandrovich@paragon-software.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: vdlg-exch-02.paragon-software.com (172.30.1.105) To vdlg-exch-02.paragon-software.com (172.30.1.105) Signed-off-by: Konstantin Komarov Cc: stable@vger.kernel.org --- fs/ntfs3/dir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ntfs3/dir.c b/fs/ntfs3/dir.c index 5cf3d9decf64..45e556fd7c54 100644 --- a/fs/ntfs3/dir.c +++ b/fs/ntfs3/dir.c @@ -475,6 +475,7 @@ static int ntfs_readdir(struct file *file, struct dir_context *ctx) vbo = (u64)bit << index_bits; if (vbo >= i_size) { ntfs_inode_err(dir, "Looks like your dir is corrupt"); + ctx->pos = eod; err = -EINVAL; goto out; } -- 2.34.1