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

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



commit db3b3f3dd4c8436d903ba51c63cd80ba9ed05424
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 71e091f879f0e..1dc07f9214d57 100644
--- a/drivers/tty/vt/vc_screen.c
+++ b/drivers/tty/vt/vc_screen.c
@@ -415,10 +415,8 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
 		 */
 		size = vcs_size(vc, attr, uni_mode);
 		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