tty: make FONTX ioctl use the tty pointer they were actually passed
mainline inclusion from mainline-v5.10-rc3 commit 90bfdeef category: bugfix bugzilla: NA CVE: CVE-2020-25668 -------------------------------- Some of the font tty ioctl's always used the current foreground VC for their operations. Don't do that then. This fixes a data race on fg_console. Side note: both Michael Ellerman and Jiri Slaby point out that all these ioctls are deprecated, and should probably have been removed long ago, and everything seems to be using the KDFONTOP ioctl instead. In fact, Michael points out that it looks like busybox's loadfont program seems to have switched over to using KDFONTOP exactly _because_ of this bug (ahem.. 12 years ago ;-). Reported-by: NMinh Yuan <yuanmingbuaa@gmail.com> Acked-by: NMichael Ellerman <mpe@ellerman.id.au> Acked-by: NJiri Slaby <jirislaby@kernel.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Conflicts: drivers/tty/vt/vt_ioctl.c [yyl: There is no vt_io_fontreset(), change the vc_cons to vc in do_fontx_ioctl()] Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Reviewed-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录