projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32ff683
)
vc_screen: modify vcs_size() handling in vcs_read()
author
George Kennedy
<george.kennedy@oracle.com>
Mon, 27 Feb 2023 20:21:41 +0000
(15:21 -0500)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Tue, 28 Feb 2023 00:10:38 +0000
(16:10 -0800)
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@kernel.org>
Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/tty/vt/vc_screen.c
patch
|
blob
|
history
diff --git
a/drivers/tty/vt/vc_screen.c
b/drivers/tty/vt/vc_screen.c
index
f566eb1
..
c0a2273
100644
(file)
--- a/
drivers/tty/vt/vc_screen.c
+++ b/
drivers/tty/vt/vc_screen.c
@@
-414,10
+414,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;