Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dist/uts/common/fs/zfs validate the leng...



details:   https://anonhg.NetBSD.org/src/rev/845de6998ba8
branches:  trunk
changeset: 453343:845de6998ba8
user:      maya <maya%NetBSD.org@localhost>
date:      Wed Aug 07 20:45:53 2019 +0000

description:
validate the length of args (like other filesystems)

ok riastradh

diffstat:

 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r e538f1aadc4d -r 845de6998ba8 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c   Wed Aug 07 20:34:12 2019 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c   Wed Aug 07 20:45:53 2019 +0000
@@ -1993,6 +1993,9 @@
        if (uap == NULL)
                return (SET_ERROR(EINVAL));
 
+       if (*data_len < sizeof *uap)
+               return (SET_ERROR(EINVAL));
+
        if (mvp->v_type != VDIR)
                return (SET_ERROR(ENOTDIR));
 



Home | Main Index | Thread Index | Old Index