Patch "orangefs: fix out-of-bounds fsid access" has been added to the 6.9-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

    orangefs: fix out-of-bounds fsid access

to the 6.9-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:
     orangefs-fix-out-of-bounds-fsid-access.patch
and it can be found in the queue-6.9 subdirectory.

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



commit 90b244ce6f7f430c59f382c1ee7941a1952e9d87
Author: Mike Marshall <hubcap@xxxxxxxxxxxx>
Date:   Wed May 1 16:20:36 2024 -0400

    orangefs: fix out-of-bounds fsid access
    
    [ Upstream commit 53e4efa470d5fc6a96662d2d3322cfc925818517 ]
    
    Arnd Bergmann sent a patch to fsdevel, he says:
    
    "orangefs_statfs() copies two consecutive fields of the superblock into
    the statfs structure, which triggers a warning from the string fortification
    helpers"
    
    Jan Kara suggested an alternate way to do the patch to make it more readable.
    
    I ran both ideas through xfstests and both seem fine. This patch
    is based on Jan Kara's suggestion.
    
    Signed-off-by: Mike Marshall <hubcap@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c
index 34849b4a3243c..907765673765c 100644
--- a/fs/orangefs/super.c
+++ b/fs/orangefs/super.c
@@ -201,7 +201,8 @@ static int orangefs_statfs(struct dentry *dentry, struct kstatfs *buf)
 		     (long)new_op->downcall.resp.statfs.files_avail);
 
 	buf->f_type = sb->s_magic;
-	memcpy(&buf->f_fsid, &ORANGEFS_SB(sb)->fs_id, sizeof(buf->f_fsid));
+	buf->f_fsid.val[0] = ORANGEFS_SB(sb)->fs_id;
+	buf->f_fsid.val[1] = ORANGEFS_SB(sb)->id;
 	buf->f_bsize = new_op->downcall.resp.statfs.block_size;
 	buf->f_namelen = ORANGEFS_NAME_MAX;
 




[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