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] [day] [month] [year] [list]
Message-ID: <20120914124332.GA32193@redhat.com>
Date:	Fri, 14 Sep 2012 14:43:32 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Alex Kelly <alex.page.kelly@...il.com>,
	Andi Kleen <andi@...stfloor.org>,
	Cong Wang <amwang@...hat.com>,
	Denys Vlasenko <vda.linux@...glemail.com>,
	Jiri Moskovcak <jmoskovc@...hat.com>,
	Neil Horman <nhorman@...driver.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] coredump: use SUID_DUMPABLE_ENABLED rather than hardcoded 1

Cosmetic. Change setup_new_exec() and task_dumpable() to use
SUID_DUMPABLE_ENABLED for /bin/grep.

Signed-off-by: Oleg Nesterov <oleg@...hat.com>
---
 fs/exec.c      |    2 +-
 fs/proc/base.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/exec.c b/fs/exec.c
index 905e94b..1d3dfc5 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1125,7 +1125,7 @@ void setup_new_exec(struct linux_binprm * bprm)
 	current->sas_ss_sp = current->sas_ss_size = 0;
 
 	if (uid_eq(current_euid(), current_uid()) && gid_eq(current_egid(), current_gid()))
-		set_dumpable(current->mm, 1);
+		set_dumpable(current->mm, SUID_DUMPABLE_ENABLED);
 	else
 		set_dumpable(current->mm, suid_dumpable);
 
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 21fb230..7f40bb7 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1398,7 +1398,7 @@ static int task_dumpable(struct task_struct *task)
 	if (mm)
 		dumpable = get_dumpable(mm);
 	task_unlock(task);
-	if(dumpable == 1)
+	if(dumpable == SUID_DUMPABLE_ENABLED)
 		return 1;
 	return 0;
 }
-- 
1.5.5.1


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