Patch "fs/ntfs3: Delete duplicate condition in ntfs_read_mft()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    fs/ntfs3: Delete duplicate condition in ntfs_read_mft()

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     fs-ntfs3-delete-duplicate-condition-in-ntfs_read_mft.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c33b3a1283a1930809f5c08123864f36ec92cce6
Author: Dan Carpenter <error27@xxxxxxxxx>
Date:   Sat Oct 15 11:28:55 2022 +0300

    fs/ntfs3: Delete duplicate condition in ntfs_read_mft()
    
    [ Upstream commit 658015167a8432b88f5d032e9d85d8fd50e5bf2c ]
    
    There were two patches which addressed the same bug and added the same
    condition:
    
    commit 6db620863f85 ("fs/ntfs3: Validate data run offset")
    commit 887bfc546097 ("fs/ntfs3: Fix slab-out-of-bounds read in run_unpack")
    
    Delete one condition.
    
    Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Signed-off-by: Konstantin Komarov <almaz.alexandrovich@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index d98d047c778c..e352aa37330c 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -374,12 +374,6 @@ static struct inode *ntfs_read_mft(struct inode *inode,
 
 	t64 = le64_to_cpu(attr->nres.svcn);
 
-	/* offset to packed runs is out-of-bounds */
-	if (roff > asize) {
-		err = -EINVAL;
-		goto out;
-	}
-
 	err = run_unpack_ex(run, sbi, ino, t64, le64_to_cpu(attr->nres.evcn),
 			    t64, Add2Ptr(attr, roff), asize - roff);
 	if (err < 0)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux