Date: Fri, 22 Jul 2016 17:22:38 +0000 (UTC) From: Konstantin Belousov <kib@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: r303192 - stable/11/sys/kern Message-ID: <201607221722.u6MHMcGJ092664@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Jul 22 17:22:37 2016 New Revision: 303192 URL: https://svnweb.freebsd.org/changeset/base/303192 Log: MFC r302893: Do not allow creation of char or block special nodes with VNOVAL dev_t. Approved by: re (gjb) Modified: stable/11/sys/kern/vfs_syscalls.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_syscalls.c ============================================================================== --- stable/11/sys/kern/vfs_syscalls.c Fri Jul 22 16:48:39 2016 (r303191) +++ stable/11/sys/kern/vfs_syscalls.c Fri Jul 22 17:22:37 2016 (r303192) @@ -1167,6 +1167,8 @@ kern_mknodat(struct thread *td, int fd, case S_IFCHR: case S_IFBLK: error = priv_check(td, PRIV_VFS_MKNOD_DEV); + if (error == 0 && dev == VNOVAL) + error = EINVAL; break; case S_IFMT: error = priv_check(td, PRIV_VFS_MKNOD_BAD);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607221722.u6MHMcGJ092664>