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:	Tue, 10 Jul 2007 01:27:36 -0500
From:	Matt Mackall <mpm@...enic.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Jeremy Fitzhardinge <jeremy@...p.org>,
	David Rientjes <rientjes@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: maps2-add-proc-pid-pagemap-interface.patch

On Tue, Jul 10, 2007 at 02:28:50PM +1000, Rusty Russell wrote:
> On Mon, 2007-07-09 at 17:31 -0500, Matt Mackall wrote:
> > > And how about "cpu_to_le16(1) == 1" instead of "ntohl(1) != 1"?
> > 
> > Why?
> 
> Using a networking macro to detect endianness is old school: we have the
> nice explicit macros these days...
> 
> > > > +	while (pm.count > 0 && vma) {
> > > > +		if (!ptrace_may_attach(task)) {
> > > > +			ret = -EIO;
> > > > +			goto out_mm;
> > > > +		}
> > > 
> > > You already checked ptrace_may_attach() earlier in this function; do you
> > > need to do that again?
> > 
> > I think so. Consider exec(). This whole area is full of interesting
> > traps and it pays to be paranoid.
> 
> I don't think normal ptraces get cut on exec, so I'm not sure why this
> should be different.

They absolutely do, if UID changes. Consider ptracing a shell
launching a setuid binary. For something more closely analogous,
consider opening /proc/pid/mem on the same shell...

-- 
Mathematics is the supreme nostalgia of our time.
-
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