Patch "vc_screen: modify vcs_size() handling in vcs_read()" has been added to the 5.4-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

    vc_screen: modify vcs_size() handling in vcs_read()

to the 5.4-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:
     vc_screen-modify-vcs_size-handling-in-vcs_read.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 87d8e1d7fea46f6f2c921216c412d9075ffc12b5
Author: George Kennedy <george.kennedy@xxxxxxxxxx>
Date:   Mon Feb 27 15:21:41 2023 -0500

    vc_screen: modify vcs_size() handling in vcs_read()
    
    [ Upstream commit 46d733d0efc79bc8430d63b57ab88011806d5180 ]
    
    Restore the vcs_size() handling in vcs_read() to what
    it had been in previous version.
    
    Fixes: 226fae124b2d ("vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF")
    Suggested-by: Jiri Slaby <jirislaby@xxxxxxxxxx>
    Signed-off-by: George Kennedy <george.kennedy@xxxxxxxxxx>
    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c
index eb7208f07345d..90de3331e4a51 100644
--- a/drivers/tty/vt/vc_screen.c
+++ b/drivers/tty/vt/vc_screen.c
@@ -296,10 +296,8 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
 		 */
 		size = vcs_size(inode);
 		if (size < 0) {
-			if (read)
-				break;
 			ret = size;
-			goto unlock_out;
+			break;
 		}
 		if (pos >= size)
 			break;



[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