linuxulator: fix stack memory disclosure in linux_ioctl_termio

admbugs:	765
Reported by:	Vlad Tsyrklevich <vlad@tsyrklevich.net>
Reviewed by:	andrew
MFC after:	1 day
Security:	Kernel stack memory disclosure
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2019-01-21 16:21:03 +00:00
parent 4308a37410
commit 9866e7bbae

View file

@ -686,6 +686,7 @@ bsd_to_linux_termio(struct termios *bios, struct linux_termio *lio)
{
struct linux_termios lios;
memset(lio, 0, sizeof(*lio));
bsd_to_linux_termios(bios, &lios);
lio->c_iflag = lios.c_iflag;
lio->c_oflag = lios.c_oflag;