svn commit: r332062 - stable/11/sys/compat/linux
Ed Maste
emaste at FreeBSD.org
Thu Apr 5 12:48:58 UTC 2018
Author: emaste
Date: Thu Apr 5 12:48:58 2018
New Revision: 332062
URL: https://svnweb.freebsd.org/changeset/base/332062
Log:
MFC r332034: linux_ioctl_hdio: fix kernel memory disclosure
Stack-allocated struct linux_hd_big_geometry has undeclared padding
copied to userland.
admbugs: 765
Reported by: Vlad Tsyrklevich
Security: Kernel memory disclosure
Sponsored by: The FreeBSD Foundation
Modified:
stable/11/sys/compat/linux/linux_ioctl.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/compat/linux/linux_ioctl.c
==============================================================================
--- stable/11/sys/compat/linux/linux_ioctl.c Thu Apr 5 11:03:21 2018 (r332061)
+++ stable/11/sys/compat/linux/linux_ioctl.c Thu Apr 5 12:48:58 2018 (r332062)
@@ -253,6 +253,7 @@ linux_ioctl_hdio(struct thread *td, struct linux_ioctl
} else if ((args->cmd & 0xffff) == LINUX_HDIO_GET_GEO_BIG) {
struct linux_hd_big_geometry hdbg;
+ memset(&hdbg, 0, sizeof(hdbg));
hdbg.cylinders = fwcylinders;
hdbg.heads = fwheads;
hdbg.sectors = fwsectors;
More information about the svn-src-stable
mailing list