]> git.baikalelectronics.ru Git - kernel.git/commit
vc_screen: modify vcs_size() handling in vcs_read()
authorGeorge Kennedy <george.kennedy@oracle.com>
Mon, 27 Feb 2023 20:21:41 +0000 (15:21 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 15:44:12 +0000 (16:44 +0100)
commit3f115e1ab40e3f1ef420ee0e1c2f7f2d6e2973ed
tree087b9bb822aa38868c5e8e6e8ed2149c61bc9319
parentb90d012f1a4e1fa9d9e01dc73ab9e399ba138b0f
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@kernel.org>
Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/vt/vc_screen.c