lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 Jul 2007 08:56:30 -0400
From:	David Patrick Quigley <dpquigl@...ho.nsa.gov>
To:	"Amit K. Arora" <aarora@...ux.vnet.ibm.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	eparis@...hat.com, jmorris@...ei.org, sds@...ho.nsa.gov
Subject: Re: [PATCH 2/7] fallocate() implementation in i386, x86_64 and
	powerpc

From: David P. Quigley <dpquigl@...ho.nsa.gov>

Revalidate the write permissions for fallocate(2), in case security policy has
changed since the files were opened.

Signed-off-by: David P. Quigley <dpquigl@...ho.nsa.gov>

fs/open.c |    3 +++
1 file changed, 3 insertions(+)

diff -uprN -X linux-2.6.22/Documentation/dontdiff linux-2.6.22-fallocate/fs/open.c linux-2.6.22-fallocate-selinux/fs/open.c
--- linux-2.6.22-fallocate/fs/open.c	2007-07-11 15:51:10.000000000 -0400
+++ linux-2.6.22-fallocate-selinux/fs/open.c	2007-07-11 16:10:43.000000000 -0400
@@ -411,6 +411,9 @@ asmlinkage long sys_fallocate(int fd, in
 		goto out;
 	if (!(file->f_mode & FMODE_WRITE))
 		goto out_fput;
+	ret = security_file_permission(file, MAY_WRITE);
+	if (ret)
+		goto out_fput;
 
 	inode = file->f_path.dentry->d_inode;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ