Re: [RFC v4][PATCH 5/9] Memory managemnet (restore)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Serge E. Hallyn
Date: Tuesday, September 9, 2008 - 9:07 am

Quoting Oren Laadan (orenl@cs.columbia.edu):

As Dave has pointed out, this appears to be a security problem.  I think
what you need to do is create a new helper mprotect_fixup_withchecks(),
which does all the DAC+MAC checks which are done in the sys_mprotect()
loop starting with "for (nstart = start ; ; ) {...  Otherwise an
unprivileged user can create a checkpoint image of a program which has
done a ro shared file mmap, edit the checkpoint, then restart it and (i
assume) cause the modified contents to be written to the file.  This
could violate both DAC checks and selinux checks.

So create that helper which does the security checks, and use it
both here and in the sys_mprotect() loop, please.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC v4][PATCH 0/9] Kernel based checkpoint/restart`, Oren Laadan, (Tue Sep 9, 12:42 am)
[RFC v4][PATCH 3/9] x86 support for checkpoint/restart, Oren Laadan, (Tue Sep 9, 12:42 am)
[RFC v4][PATCH 4/9] Memory management (dump), Oren Laadan, (Tue Sep 9, 12:42 am)
[RFC v4][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Tue Sep 9, 12:42 am)
[RFC v4][PATCH 7/9] Infrastructure for shared objects, Oren Laadan, (Tue Sep 9, 12:42 am)
[RFC v4][PATCH 8/9] File descriprtors (dump), Oren Laadan, (Tue Sep 9, 12:42 am)
[RFC v4][PATCH 9/9] File descriprtors (restore), Oren Laadan, (Tue Sep 9, 12:42 am)
Re: [RFC v4][PATCH 8/9] File descriprtors (dump), Vegard Nossum, (Tue Sep 9, 1:06 am)
Re: [RFC v4][PATCH 8/9] File descriprtors (dump), Vegard Nossum, (Tue Sep 9, 1:23 am)
Re: [RFC v4][PATCH 4/9] Memory management (dump), Vegard Nossum, (Tue Sep 9, 2:22 am)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Serge E. Hallyn, (Tue Sep 9, 9:07 am)
Re: [RFC v4][PATCH 9/9] File descriprtors (restore), Dave Hansen, (Tue Sep 9, 9:26 am)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Tue Sep 9, 4:35 pm)
Re: [RFC v4][PATCH 9/9] File descriprtors (restore), Oren Laadan, (Tue Sep 9, 6:49 pm)
Re: [RFC v4][PATCH 8/9] File descriprtors (dump), Oren Laadan, (Tue Sep 9, 7:01 pm)
Re: [RFC v4][PATCH 4/9] Memory management (dump), MinChan Kim, (Wed Sep 10, 12:51 am)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Serge E. Hallyn, (Wed Sep 10, 8:00 am)
Re: [RFC v4][PATCH 9/9] File descriprtors (restore), Dave Hansen, (Wed Sep 10, 9:09 am)
Re: [RFC v4][PATCH 4/9] Memory management (dump), Dave Hansen, (Wed Sep 10, 9:55 am)
Re: [RFC v4][PATCH 4/9] Memory management (dump), Dave Hansen, (Wed Sep 10, 10:45 am)
Re: [RFC v4][PATCH 4/9] Memory management (dump), Oren Laadan, (Wed Sep 10, 11:28 am)
Re: [RFC v4][PATCH 9/9] File descriprtors (restore), Oren Laadan, (Wed Sep 10, 11:55 am)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Wed Sep 10, 12:31 pm)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Wed Sep 10, 12:48 pm)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Dave Hansen, (Wed Sep 10, 1:49 pm)
Cleanups for [PATCH 4/9] Memory management (dump), Dave Hansen, (Wed Sep 10, 2:03 pm)
Re: [RFC v4][PATCH 4/9] Memory management (dump), Dave Hansen, (Wed Sep 10, 2:38 pm)
Re: [RFC v4][PATCH 4/9] Memory management (dump), MinChan Kim, (Wed Sep 10, 4:49 pm)
Re: [RFC v4][PATCH 8/9] File descriprtors (dump), MinChan Kim, (Wed Sep 10, 10:02 pm)
Re: [RFC v4][PATCH 8/9] File descriprtors (dump), Oren Laadan, (Wed Sep 10, 11:37 pm)
Re: [RFC v4][PATCH 5/9] Memory managemnet (restore), Oren Laadan, (Wed Sep 10, 11:59 pm)
Re: [RFC v4][PATCH 4/9] Memory management (dump), Dave Hansen, (Fri Sep 12, 9:57 am)