Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fadaef4 authored by Al Viro's avatar Al Viro
Browse files

auxv: require the target to be tracable (or yourself)



same as for environ, except that we didn't do any checks to
prevent access after suid execve

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent d6f64b89
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -281,9 +281,9 @@ static int proc_pid_cmdline(struct task_struct *task, char * buffer)


static int proc_pid_auxv(struct task_struct *task, char *buffer)
static int proc_pid_auxv(struct task_struct *task, char *buffer)
{
{
	int res = 0;
	struct mm_struct *mm = mm_for_maps(task);
	struct mm_struct *mm = get_task_mm(task);
	int res = PTR_ERR(mm);
	if (mm) {
	if (mm && !IS_ERR(mm)) {
		unsigned int nwords = 0;
		unsigned int nwords = 0;
		do {
		do {
			nwords += 2;
			nwords += 2;