Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Correct wrong type of uio_seg passed to do_sys_mkno...



details:   https://anonhg.NetBSD.org/src/rev/6809b76e1e6d
branches:  trunk
changeset: 842196:6809b76e1e6d
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed Jun 19 14:16:06 2019 +0000

description:
Correct wrong type of uio_seg passed to do_sys_mknodat()

It was introduced by an accident in previous commit to this file.

Detected by syzbot:
https://syzkaller.appspot.com/text?tag=CrashLog&x=16635d9ea00000

diffstat:

 sys/kern/vfs_syscalls.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r b0120d3f6c39 -r 6809b76e1e6d sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c   Wed Jun 19 13:40:23 2019 +0000
+++ b/sys/kern/vfs_syscalls.c   Wed Jun 19 14:16:06 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls.c,v 1.529 2019/06/18 22:34:25 kamil Exp $ */
+/*     $NetBSD: vfs_syscalls.c,v 1.530 2019/06/19 14:16:06 kamil 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.529 2019/06/18 22:34:25 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.530 2019/06/19 14:16:06 kamil Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -2165,7 +2165,7 @@
                syscallarg(dev_t) dev;
        } */
        return do_sys_mknodat(l, AT_FDCWD, SCARG(uap, path),
-           SCARG(uap, mode), SCARG(uap, dev), UIO_SYSSPACE);
+           SCARG(uap, mode), SCARG(uap, dev), UIO_USERSPACE);
 }
 
 int
@@ -2181,7 +2181,7 @@
        } */
 
        return do_sys_mknodat(l, SCARG(uap, fd), SCARG(uap, path),
-           SCARG(uap, mode), SCARG(uap, dev), UIO_SYSSPACE);
+           SCARG(uap, mode), SCARG(uap, dev), UIO_USERSPACE);
 }
 
 int



Home | Main Index | Thread Index | Old Index