Patch "udf: Fix bogus checksum computation in udf_rename()" 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

    udf: Fix bogus checksum computation in udf_rename()

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:
     udf-fix-bogus-checksum-computation-in-udf_rename.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 7f25164e064fbc09897135caccebcfe545a87cc1
Author: Jan Kara <jack@xxxxxxx>
Date:   Mon Jun 17 17:41:51 2024 +0200

    udf: Fix bogus checksum computation in udf_rename()
    
    [ Upstream commit 27ab33854873e6fb958cb074681a0107cc2ecc4c ]
    
    Syzbot reports uninitialized memory access in udf_rename() when updating
    checksum of '..' directory entry of a moved directory. This is indeed
    true as we pass on-stack diriter.fi to the udf_update_tag() and because
    that has only struct fileIdentDesc included in it and not the impUse or
    name fields, the checksumming function is going to checksum random stack
    contents beyond the end of the structure. This is actually harmless
    because the following udf_fiiter_write_fi() will recompute the checksum
    from on-disk buffers where everything is properly included. So all that
    is needed is just removing the bogus calculation.
    
    Fixes: e9109a92d2a9 ("udf: Convert udf_rename() to new directory iteration code")
    Link: https://lore.kernel.org/all/000000000000cf405f060d8f75a9@xxxxxxxxxx/T/
    Link: https://patch.msgid.link/20240617154201.29512-1-jack@xxxxxxx
    Reported-by: syzbot+d31185aa54170f7fc1f5@xxxxxxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Jan Kara <jack@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index 7c95c549dd64e..ded71044988ab 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -1183,7 +1183,6 @@ static int udf_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
 
 	if (dir_fi) {
 		dir_fi->icb.extLocation = cpu_to_lelb(UDF_I(new_dir)->i_location);
-		udf_update_tag((char *)dir_fi, udf_dir_entry_len(dir_fi));
 		if (old_iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB)
 			mark_inode_dirty(old_inode);
 		else




[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