]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Validate whether the zfs_cmd_t submitted from userland is not smaller than
authordelphij <delphij@FreeBSD.org>
Fri, 5 Nov 2010 22:18:09 +0000 (22:18 +0000)
committerdelphij <delphij@FreeBSD.org>
Fri, 5 Nov 2010 22:18:09 +0000 (22:18 +0000)
commit070520ecc1bf32802f718d73dab306102fd0f0b9
treec574fa491752c9b21107af56b0b020d618b9ef99
parent9b70c12cad6c8360756139b7b157ba9a9f1f7682
Validate whether the zfs_cmd_t submitted from userland is not smaller than
what we have.  Without the check the kernel could accessing memory that
does not belong to the request struct.

Note that we do not test if the struct equals in size at this time, which
may faciliate forward compatibility with newer binaries.

Reviewed by: pjd at MeetBSD CA '2010
MFC after: 1 week
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c