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:	Thu, 13 Dec 2012 17:15:44 +0400
From:	tux2002@...nt.ru
To:	linux-kernel@...r.kernel.org
Subject: [PATCH] subsystem: proc filesystem


This patch strengthens file permissions of pid record in proc filesystem. When pid and pidentry records created, his permissions strengthens by creator umask.

./scripts/get_maintainer.pl: No supported VCS found.  Add --nogit to options?
Using a git repository produces better results.
Try Linus Torvalds' latest git repository using:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
linux-kernel@...r.kernel.org (open list)


---
--- linux-3.7/fs/proc/base.c.orig	2012-12-11 06:30:57.000000000 +0300
+++ linux-3.7/fs/proc/base.c	2012-12-13 16:48:59.000000000 +0300
@@ -2035,6 +2035,7 @@ static struct dentry *proc_pident_instan
 
 	ei = PROC_I(inode);
 	inode->i_mode = p->mode;
+	inode->i_mode &= ~(mode_t) get_current()->fs->umask;
 	if (S_ISDIR(inode->i_mode))
 		set_nlink(inode, 2);	/* Use getattr to fix if necessary */
 	if (p->iop)
@@ -2856,7 +2857,8 @@ static struct dentry *proc_pid_instantia
 	if (!inode)
 		goto out;
 
-	inode->i_mode = S_IFDIR|S_IRUGO|S_IXUGO;
+	inode->i_mode = S_IFDIR|S_IRUGO|S_IWUSR|S_IXUGO;
+	inode->i_mode &= ~(mode_t) get_current()->fs->umask;
 	inode->i_op = &proc_tgid_base_inode_operations;
 	inode->i_fop = &proc_tgid_base_operations;
 	inode->i_flags|=S_IMMUTABLE;
---
--
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