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:	Sat, 21 Jan 2012 10:03:42 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Kees Cook <keescook@...omium.org>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Randy Dunlap <rdunlap@...otime.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Borislav Petkov <bp@...en8.de>,
	Vasiliy Kulikov <segoon@...nwall.com>,
	Dan Ballard <dan@...dstab.net>, Jiri Kosina <jkosina@...e.cz>,
	Al Viro <viro@...iv.linux.org.uk>,
	Stephen Wilson <wilsons@...rt.ca>,
	David Rientjes <rientjes@...gle.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Eric Paris <eparis@...hat.com>,
	"Serge E. Hallyn" <serge.hallyn@...onical.com>,
	linux-doc@...r.kernel.org
Subject: Re: [PATCH] sysctl: control functionality of /proc/pid/mem


* Kees Cook <keescook@...omium.org> wrote:

> @@ -702,6 +704,9 @@ static int mem_open(struct inode* inode, struct file* file)
>  	struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode);
>  	struct mm_struct *mm;
>  
> +	if (sysctl_proc_pid_mem < 1)
> +		return -EACCES;

This looks like an unprivileged user-space triggerable memory 
leak DoS. The task reference is already acquired at that point.

See how easy it is to introduce bugs with potential security 
side-effects, even when the intention is to increase security?
:-)

( Btw., this is why i generally prefer 'invariant' local
  variable definition blocks that have no serious side effects -
  it makes the flow more obvious. Local variables slip off the 
  eye rather often and don't register as 'real' code.)

Thanks,

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