An (un)privileged user can easily make the kernel dereference a NULL

pointer.

The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).

ok christos@
This commit is contained in:
maxv 2014-04-16 18:55:17 +00:00
parent 267c148161
commit 23f76b6d00
30 changed files with 120 additions and 61 deletions

View File

@ -1596,6 +1596,9 @@ zfs_mount(vfs_t *vfsp, const char *path, void *data, size_t *data_len)
if (mvp->v_type != VDIR)
return (ENOTDIR);
if (uap == NULL)
return (EINVAL);
mutex_enter(mvp->v_interlock);
if ((uap->flags & MS_REMOUNT) == 0 &&
(uap->flags & MS_OVERLAY) == 0 &&

View File

@ -1,4 +1,4 @@
/* $NetBSD: coda_vfsops.c,v 1.80 2014/03/23 15:21:15 hannken Exp $ */
/* $NetBSD: coda_vfsops.c,v 1.81 2014/04/16 18:55:17 maxv Exp $ */
/*
*
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: coda_vfsops.c,v 1.80 2014/03/23 15:21:15 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: coda_vfsops.c,v 1.81 2014/04/16 18:55:17 maxv Exp $");
#ifndef _KERNEL_OPT
#define NVCODA 4
@ -178,6 +178,8 @@ coda_mount(struct mount *vfsp, /* Allocated and initialized by mount(2) */
CodaFid ctlfid = CTL_FID;
int error;
if (data == NULL)
return EINVAL;
if (vfsp->mnt_flag & MNT_GETARGS)
return EINVAL;
ENTRY;

View File

@ -1,4 +1,4 @@
/* $NetBSD: advfsops.c,v 1.69 2014/03/23 15:21:15 hannken Exp $ */
/* $NetBSD: advfsops.c,v 1.70 2014/04/16 18:55:18 maxv Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.69 2014/03/23 15:21:15 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.70 2014/04/16 18:55:18 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -92,6 +92,8 @@ adosfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
int error;
mode_t accessmode;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cd9660_vfsops.c,v 1.83 2014/03/24 04:03:25 dholland Exp $ */
/* $NetBSD: cd9660_vfsops.c,v 1.84 2014/04/16 18:55:18 maxv Exp $ */
/*-
* Copyright (c) 1994
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.83 2014/03/24 04:03:25 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.84 2014/04/16 18:55:18 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -216,6 +216,8 @@ cd9660_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
int error;
struct iso_mnt *imp = VFSTOISOFS(mp);
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: efs_vfsops.c,v 1.24 2012/12/20 08:03:42 hannken Exp $ */
/* $NetBSD: efs_vfsops.c,v 1.25 2014/04/16 18:55:18 maxv Exp $ */
/*
* Copyright (c) 2006 Stephen M. Rumble <rumble@ephemeral.org>
@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: efs_vfsops.c,v 1.24 2012/12/20 08:03:42 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: efs_vfsops.c,v 1.25 2014/04/16 18:55:18 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -180,6 +180,8 @@ efs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
struct vnode *devvp;
int err, mode;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: filecore_vfsops.c,v 1.75 2014/03/23 15:21:15 hannken Exp $ */
/* $NetBSD: filecore_vfsops.c,v 1.76 2014/04/16 18:55:18 maxv Exp $ */
/*-
* Copyright (c) 1994 The Regents of the University of California.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.75 2014/03/23 15:21:15 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: filecore_vfsops.c,v 1.76 2014/04/16 18:55:18 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -229,6 +229,8 @@ filecore_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
int error;
struct filecore_mnt *fcmp = NULL;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: hfs_vfsops.c,v 1.30 2014/03/23 15:21:15 hannken Exp $ */
/* $NetBSD: hfs_vfsops.c,v 1.31 2014/04/16 18:55:18 maxv Exp $ */
/*-
* Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.30 2014/03/23 15:21:15 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.31 2014/04/16 18:55:18 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@ -201,6 +201,8 @@ hfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
int update;
mode_t accessmode;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfs_vfsops.c,v 1.106 2014/03/23 15:21:15 hannken Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.107 2014/04/16 18:55:18 maxv Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.106 2014/03/23 15:21:15 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: msdosfs_vfsops.c,v 1.107 2014/04/16 18:55:18 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -284,6 +284,8 @@ msdosfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
int error, flags;
mode_t accessmode;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: nilfs_vfsops.c,v 1.15 2014/03/23 15:21:15 hannken Exp $ */
/* $NetBSD: nilfs_vfsops.c,v 1.16 2014/04/16 18:55:18 maxv Exp $ */
/*
* Copyright (c) 2008, 2009 Reinoud Zandijk
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.15 2014/03/23 15:21:15 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.16 2014/04/16 18:55:18 maxv Exp $");
#endif /* not lint */
@ -800,6 +800,8 @@ nilfs_mount(struct mount *mp, const char *path,
DPRINTF(VFSCALL, ("nilfs_mount called\n"));
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ntfs_vfsops.c,v 1.93 2014/03/23 15:21:15 hannken Exp $ */
/* $NetBSD: ntfs_vfsops.c,v 1.94 2014/04/16 18:55:18 maxv Exp $ */
/*-
* Copyright (c) 1998, 1999 Semen Ustimenko
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.93 2014/03/23 15:21:15 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.94 2014/04/16 18:55:18 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -172,6 +172,8 @@ ntfs_mount (
struct vnode *devvp;
struct ntfs_args *args = data;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ptyfs_vfsops.c,v 1.49 2014/04/04 18:10:29 christos Exp $ */
/* $NetBSD: ptyfs_vfsops.c,v 1.50 2014/04/16 18:55:18 maxv Exp $ */
/*
* Copyright (c) 1992, 1993, 1995
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ptyfs_vfsops.c,v 1.49 2014/04/04 18:10:29 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ptyfs_vfsops.c,v 1.50 2014/04/16 18:55:18 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -259,6 +259,8 @@ ptyfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
struct ptyfsmount *pmnt;
struct ptyfs_args *args = data;
if (args == NULL)
return EINVAL;
if (*data_len != sizeof *args && *data_len != OSIZE)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs_vfsops.c,v 1.109 2014/03/23 15:21:15 hannken Exp $ */
/* $NetBSD: puffs_vfsops.c,v 1.110 2014/04/16 18:55:18 maxv Exp $ */
/*
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.109 2014/03/23 15:21:15 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.110 2014/04/16 18:55:18 maxv Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -102,6 +102,8 @@ puffs_vfsop_mount(struct mount *mp, const char *path, void *data,
int error = 0, i;
pid_t mntpid = curlwp->l_proc->p_pid;
if (data == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;
@ -116,12 +118,6 @@ puffs_vfsop_mount(struct mount *mp, const char *path, void *data,
if (mp->mnt_flag & MNT_UPDATE)
return EOPNOTSUPP;
/*
* We need the file system name
*/
if (!data)
return EINVAL;
args = (struct puffs_kargs *)data;
if (args->pa_vers != PUFFSVERSION) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: smbfs_vfsops.c,v 1.99 2014/03/23 15:21:15 hannken Exp $ */
/* $NetBSD: smbfs_vfsops.c,v 1.100 2014/04/16 18:55:18 maxv Exp $ */
/*
* Copyright (c) 2000-2001, Boris Popov
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: smbfs_vfsops.c,v 1.99 2014/03/23 15:21:15 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: smbfs_vfsops.c,v 1.100 2014/04/16 18:55:18 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -156,6 +156,8 @@ smbfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
char *fromname;
int error;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysvbfs_vfsops.c,v 1.42 2013/12/25 11:15:49 mlelstv Exp $ */
/* $NetBSD: sysvbfs_vfsops.c,v 1.43 2014/04/16 18:55:19 maxv Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.42 2013/12/25 11:15:49 mlelstv Exp $");
__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.43 2014/04/16 18:55:19 maxv Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -77,6 +77,8 @@ sysvbfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
DPRINTF("%s: mnt_flag=%x\n", __func__, mp->mnt_flag);
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tmpfs_vfsops.c,v 1.58 2014/03/23 15:21:16 hannken Exp $ */
/* $NetBSD: tmpfs_vfsops.c,v 1.59 2014/04/16 18:55:19 maxv Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.58 2014/03/23 15:21:16 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: tmpfs_vfsops.c,v 1.59 2014/04/16 18:55:19 maxv Exp $");
#include <sys/param.h>
#include <sys/types.h>
@ -103,6 +103,9 @@ tmpfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
ino_t nodes;
int error;
if (args == NULL)
return EINVAL;
/* Validate the version. */
if (*data_len < sizeof(*args) ||
args->ta_version != TMPFS_ARGS_VERSION)

View File

@ -1,4 +1,4 @@
/* $NetBSD: udf_vfsops.c,v 1.66 2014/03/23 15:21:16 hannken Exp $ */
/* $NetBSD: udf_vfsops.c,v 1.67 2014/04/16 18:55:19 maxv Exp $ */
/*
* Copyright (c) 2006, 2008 Reinoud Zandijk
@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.66 2014/03/23 15:21:16 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: udf_vfsops.c,v 1.67 2014/04/16 18:55:19 maxv Exp $");
#endif /* not lint */
@ -316,6 +316,8 @@ udf_mount(struct mount *mp, const char *path,
DPRINTF(CALL, ("udf_mount called\n"));
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: union_vfsops.c,v 1.71 2014/03/23 15:21:16 hannken Exp $ */
/* $NetBSD: union_vfsops.c,v 1.72 2014/04/16 18:55:19 maxv Exp $ */
/*
* Copyright (c) 1994 The Regents of the University of California.
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.71 2014/03/23 15:21:16 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.72 2014/04/16 18:55:19 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -119,6 +119,8 @@ union_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
int len;
size_t size;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -89,6 +89,8 @@ unionfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
const char *cp;
char *xp;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: v7fs_vfsops.c,v 1.9 2013/11/23 13:35:36 christos Exp $ */
/* $NetBSD: v7fs_vfsops.c,v 1.10 2014/04/16 18:55:19 maxv Exp $ */
/*-
* Copyright (c) 2004, 2011 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: v7fs_vfsops.c,v 1.9 2013/11/23 13:35:36 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: v7fs_vfsops.c,v 1.10 2014/04/16 18:55:19 maxv Exp $");
#if defined _KERNEL_OPT
#include "opt_v7fs.h"
#endif
@ -88,6 +88,8 @@ v7fs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
DPRINTF("mnt_flag=%x %s\n", mp->mnt_flag, update ? "update" : "");
if (args == NULL)
return EINVAL;
if (*data_len < sizeof(*args))
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_syscalls.c,v 1.478 2014/04/04 06:47:02 maxv Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.479 2014/04/16 18:55:18 maxv Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.478 2014/04/04 06:47:02 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.479 2014/04/16 18:55:18 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_fileassoc.h"
@ -481,6 +481,10 @@ do_sys_mount(struct lwp *l, struct vfsops *vfsops, const char *type,
}
}
/*
* We allow data to be NULL, even for userspace. Some fs's don't need
* it. The others will handle NULL.
*/
if (data != NULL && data_seg == UIO_USERSPACE) {
if (data_len == 0) {
/* No length supplied, use default for filesystem */

View File

@ -1,4 +1,4 @@
/* $NetBSD: null_vfsops.c,v 1.87 2014/03/23 15:21:16 hannken Exp $ */
/* $NetBSD: null_vfsops.c,v 1.88 2014/04/16 18:55:19 maxv Exp $ */
/*
* Copyright (c) 1999 National Aeronautics & Space Administration
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.87 2014/03/23 15:21:16 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.88 2014/04/16 18:55:19 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -107,6 +107,8 @@ nullfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
struct nameidata nd;
int error;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof(*args))
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: overlay_vfsops.c,v 1.60 2014/03/23 15:21:16 hannken Exp $ */
/* $NetBSD: overlay_vfsops.c,v 1.61 2014/04/16 18:55:19 maxv Exp $ */
/*
* Copyright (c) 1999, 2000 National Aeronautics & Space Administration
@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.60 2014/03/23 15:21:16 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.61 2014/04/16 18:55:19 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -114,6 +114,8 @@ ov_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
printf("ov_mount(mp = %p)\n", mp);
#endif
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: procfs_vfsops.c,v 1.90 2014/03/23 15:21:16 hannken Exp $ */
/* $NetBSD: procfs_vfsops.c,v 1.91 2014/04/16 18:55:19 maxv Exp $ */
/*
* Copyright (c) 1993
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: procfs_vfsops.c,v 1.90 2014/03/23 15:21:16 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: procfs_vfsops.c,v 1.91 2014/04/16 18:55:19 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -130,6 +130,9 @@ procfs_mount(
struct procfs_args *args = data;
int error;
if (args == NULL)
return EINVAL;
if (UIO_MX & (UIO_MX-1)) {
log(LOG_ERR, "procfs: invalid directory entry size");
return (EINVAL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: umap_vfsops.c,v 1.91 2014/03/23 15:21:16 hannken Exp $ */
/* $NetBSD: umap_vfsops.c,v 1.92 2014/04/16 18:55:19 maxv Exp $ */
/*
* Copyright (c) 1992, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.91 2014/03/23 15:21:16 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.92 2014/04/16 18:55:19 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -81,6 +81,8 @@ umapfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
int i;
#endif
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_vfsops.c,v 1.226 2014/03/23 15:21:16 hannken Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.227 2014/04/16 18:55:17 maxv Exp $ */
/*
* Copyright (c) 1989, 1993, 1995
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.226 2014/03/23 15:21:16 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: nfs_vfsops.c,v 1.227 2014/04/16 18:55:17 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_nfs.h"
@ -594,6 +594,8 @@ nfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
size_t len;
u_char *nfh;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: chfs_vfsops.c,v 1.10 2014/03/23 15:21:16 hannken Exp $ */
/* $NetBSD: chfs_vfsops.c,v 1.11 2014/04/16 18:55:19 maxv Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@ -123,6 +123,8 @@ chfs_mount(struct mount *mp,
dbg("mount()\n");
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ext2fs_vfsops.c,v 1.179 2014/03/23 15:21:16 hannken Exp $ */
/* $NetBSD: ext2fs_vfsops.c,v 1.180 2014/04/16 18:55:19 maxv Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.179 2014/03/23 15:21:16 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.180 2014/04/16 18:55:19 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -305,6 +305,8 @@ ext2fs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
int error = 0, flags, update;
mode_t accessmode;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_vfsops.c,v 1.296 2014/04/01 14:28:17 christos Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.297 2014/04/16 18:55:19 maxv Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.296 2014/04/01 14:28:17 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.297 2014/04/16 18:55:19 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@ -345,6 +345,8 @@ ffs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
int error = 0, flags, update;
mode_t accessmode;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lfs_vfsops.c,v 1.320 2014/03/24 13:42:40 hannken Exp $ */
/* $NetBSD: lfs_vfsops.c,v 1.321 2014/04/16 18:55:19 maxv Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.320 2014/03/24 13:42:40 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.321 2014/04/16 18:55:19 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@ -628,6 +628,8 @@ lfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
int error = 0, update;
mode_t accessmode;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mfs_vfsops.c,v 1.106 2014/03/23 15:21:17 hannken Exp $ */
/* $NetBSD: mfs_vfsops.c,v 1.107 2014/04/16 18:55:19 maxv Exp $ */
/*
* Copyright (c) 1989, 1990, 1993, 1994
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mfs_vfsops.c,v 1.106 2014/03/23 15:21:17 hannken Exp $");
__KERNEL_RCSID(0, "$NetBSD: mfs_vfsops.c,v 1.107 2014/04/16 18:55:19 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@ -247,6 +247,8 @@ mfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len)
struct proc *p;
int flags, error = 0;
if (args == NULL)
return EINVAL;
if (*data_len < sizeof *args)
return EINVAL;