Date: Fri, 4 May 2018 14:49:37 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r333252 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201805041449.w44EnbDI050233@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Fri May 4 14:49:37 2018 New Revision: 333252 URL: https://svnweb.freebsd.org/changeset/base/333252 Log: MFC r333234: zfs_ioctl: avoid out-of-bound read admbugs: 796 Submitted by: Domagoj Stolfa <ds815@cam.ac.uk> Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com> Approved by: re (early MFC as an EN candidate) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri May 4 14:39:32 2018 (r333251) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri May 4 14:49:37 2018 (r333252) @@ -6441,6 +6441,10 @@ zfsdev_ioctl(struct cdev *dev, u_long zcmd, caddr_t ar cflag = ZFS_CMD_COMPAT_V28; break; case sizeof(zfs_cmd_v15_t): + if (cmd >= sizeof(zfs_ioctl_v15_to_v28) / + sizeof(zfs_ioctl_v15_to_v28[0])) + return (EINVAL); + cflag = ZFS_CMD_COMPAT_V15; vecnum = zfs_ioctl_v15_to_v28[cmd];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805041449.w44EnbDI050233>