]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vt_ioctl: change VT_RESIZEX ioctl to check for error return from vc_resize()
authorGeorge Kennedy <george.kennedy@oracle.com>
Fri, 31 Jul 2020 16:33:12 +0000 (12:33 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:19:26 +0000 (11:19 +0200)
commitf24fa90862acb02ba5caa4bf9060d8b829bceb82
tree86eed3eedf9931b2fdb50c395552c0170a0758d4
parent130c03c86d23aa411ae669a8223cb409f4ff0f2a
vt_ioctl: change VT_RESIZEX ioctl to check for error return from vc_resize()

commit bc5269ca765057a1b762e79a1cfd267cd7bf1c46 upstream.

vc_resize() can return with an error after failure. Change VT_RESIZEX ioctl
to save struct vc_data values that are modified and restore the original
values in case of error.

Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Cc: stable <stable@vger.kernel.org>
Reported-by: syzbot+38a3699c7eaf165b97a6@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/1596213192-6635-2-git-send-email-george.kennedy@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt_ioctl.c