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-next>] [day] [month] [year] [list]
Date:	Sun, 16 Feb 2014 20:31:01 +0800
From:	Fabian Frederick <fabf@...net.be>
To:	linux-fsdevel@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, akpm <akpm@...ux-foundation.org>
Subject: [PATCH 1/1] fs: xattr: Don't display attributes without read access

Any user can display extented attribute names without read
access.

eg: attr -l <filename>

This patch checks inode_permission in listxattr common
function before executing vfs_listxattr.

Signed-off-by: Fabian Frederick <fabf@...net.be>
---
 fs/xattr.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/xattr.c b/fs/xattr.c
index 3377dff..d26b280 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -543,6 +543,10 @@ listxattr(struct dentry *d, char __user *list, size_t size)
 	char *klist = NULL;
 	char *vlist = NULL;	/* If non-NULL, we used vmalloc() */
 
+	error = inode_permission(d->d_inode, MAY_READ);
+	if (error)
+		return error;
+
 	if (size) {
 		if (size > XATTR_LIST_MAX)
 			size = XATTR_LIST_MAX;
-- 
1.8.1.4

--
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