[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87vbwg7z94.fsf@xmission.com>
Date: Sat, 15 Feb 2014 15:05:43 -0800
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Andrey Wagin <avagin@...il.com>
Cc: Cyrill Gorcunov <gorcunov@...il.com>,
Aditya Kali <adityakali@...gle.com>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Pavel Emelyanov <xemul@...allels.com>,
Oleg Nesterov <oleg@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
"criu\@openvz.org" <criu@...nvz.org>,
Al Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Kees Cook <keescook@...omium.org>
Subject: Re: [CRIU] [PATCH 1/3] prctl: reduce permissions to change boundaries of data, brk and stack
Andrey Wagin <avagin@...il.com> writes:
> 2014-02-14 23:16 GMT+04:00 Eric W. Biederman <ebiederm@...ssion.com>:
>>
>> Hmm. Let me rewind this a little bit.
>>
>> I want to be very stupid and ask the following.
>>
>> Why can't you have the process of interest do:
>> ptrace(PTRACE_ATTACHME);
>> execve(executable, args, ...);
>>
>> /* Have the ptracer inject the recovery/fixup code */
>> /* Fix up the mostly correct process to look like it has been
>> * executing for a while.
>> */
>>
>> That should work, set all of the interesting fields, and works as
>> non-root today. My gut feel says do that and we can just
>> deprecate/remove prctl_set_mm.
>
> start_brk and start_stack are randomized each time. I don't understand
> how execve() can restore the origin values of attributes.
As is the location of the vdso and there isn't a way to set that.
So perhaps what we want to do is to change the randomization with
mremap(old_addr, size, size, MREMAP_MAYMOVE | MREMAP_FIXED, new_addr)
and just have the kernel update all of the addresses in bulk when we
move the location.
I don't know what the folks who are worried about losing tampering
evidence will think but as a targeted special case it may not be at all
crazy.
Eric
--
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