All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] LSM/TOMOYO: Stop using per a cred variables and start using per a task_struct variables.
@ 2013-10-17 11:35 Tetsuo Handa
  2013-10-17 11:37 ` [PATCH 1/4] LSM: Add security_bprm_aborting_creds() hook Tetsuo Handa
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Tetsuo Handa @ 2013-10-17 11:35 UTC (permalink / raw)
  To: linux-security-module, linux-fsdevel

A thread titled "[RFC PATCH 0/3] System call to switch user credentials" has
started at https://lkml.org/lkml/2013/10/16/820 , and switch_cred() syscall was
proposed which will never be acceptable for TOMOYO. TOMOYO's security context
must not be switched by anything but successful do_execve() and successful
writing to securityfs interface.

Let me explain again. TOMOYO's security context represents the history of
programs current thread has successfully execve()d. That is, TOMOYO's security
context is by definition per a task_struct. TOMOYO's security context is always
subjective == objective. TOMOYO's security context must not be switched, even
temporarily, by any means other than successful do_execve() and successful
writing to securityfs interface.

This patchset is a repost of https://lkml.org/lkml/2013/6/11/258 for fixing
two of TOMOYO's long-standing bugs which exists since Linux 2.6.30, and also
protects TOMOYO from subjective != objective problem described above.

Bug 1:

  TOMOYO has been unable to check binary loader's permission upon execve()
  because TOMOYO uses different permission for the program passed to execve()
  request and the binary loader requested by the program passed to the execve()
  request, but TOMOYO was not able to distinguish them due to lack of ability
  to pass the proposed credential argument. Some attempt to pass the proposed
  credential was made but was not successful because it breaks DAC's behavior.

Bug 2:

  TOMOYO has been unable to remember that the current thread was once granted
  for managing policy, for there is no mechanism for cleanly allocating per a
  task_struct variables. As a result, TOMOYO needlessly has to check permission
  for updating policy whenever a line of policy was written. Also, if the
  userspace once deleted a line that is needed for updating policy, the current
  thread (which should be able to update policy) fails to write the rest of
  lines.
  Variables associated with copy on write credential do not help for fixing
  this bug because TOMOYO may not be allowed to modify it when TOMOYO wants to
  modify it.

This patchset has four patches. Patch 1 and 2 are essentially revival of LSM
hooks which existed until Linux 2.6.28.

[PATCH 1/4] LSM: Add security_bprm_aborting_creds() hook.
[PATCH 2/4] LSM: Revive security_task_alloc() hook.
[PATCH 3/4] TOMOYO: Remember the proposed domain while in execve() request.
[PATCH 4/4] TOMOYO: Allow caching policy manager's state until execve() request.

 b/fs/exec.c                |    1
 b/include/linux/security.h |   11 +++
 b/kernel/fork.c            |    7 +
 b/security/capability.c    |    5 +
 b/security/security.c      |    5 +
 b/security/tomoyo/common.c |   22 +++++-
 b/security/tomoyo/common.h |   34 +++++++++
 b/security/tomoyo/tomoyo.c |  163 +++++++++++++++++++++++++++++++++++++++++++--
 include/linux/security.h   |   10 ++
 security/capability.c      |    6 +
 security/security.c        |    5 +
 security/tomoyo/common.h   |    6 +
 security/tomoyo/tomoyo.c   |   32 ++++++++
 13 files changed, 298 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH 0/4] LSM/TOMOYO: Introduce per a task_struct variables.
@ 2013-06-11 13:11 Tetsuo Handa
  2013-06-11 13:12 ` [PATCH 1/4] LSM: Add security_bprm_aborting_creds() hook Tetsuo Handa
  0 siblings, 1 reply; 12+ messages in thread
From: Tetsuo Handa @ 2013-06-11 13:11 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel, linux-security-module

This patchset is for fixing two of TOMOYO's long-standing bugs which exists
since Linux 2.6.30.

Bug 1:

  TOMOYO has been unable to check binary loader's permission upon execve()
  because TOMOYO uses different permission for the program passed to execve()
  request and the binary loader requested by the program passed to the execve()
  request, but TOMOYO was not able to distinguish them due to lack of ability
  to pass the proposed credential argument. Some attempt to pass the proposed
  credential was made but was not successful because it breaks DAC's behavior.

Bug 2:

  TOMOYO has been unable to remember that the current thread was once granted
  for managing policy, for there is no mechanism for cleanly allocating per a
  task_struct variables. As a result, TOMOYO needlessly has to check permission
  for updating policy whenever a line of policy was written. Also, if the
  userspace once deleted a line that is needed for updating policy, the current
  thread (which should be able to update policy) fails to write the rest of
  lines.
  Variables associated with copy on write credential do not help for fixing
  this bug because TOMOYO may not be allowed to modify it when TOMOYO wants to
  modify it.

This patchset has four patches. Patch 1 and 2 are essentially revival of LSM
hooks which existed until Linux 2.6.28.

[PATCH 1/4] LSM: Add security_bprm_aborting_creds() hook.
[PATCH 2/4] LSM: Revive security_task_alloc() hook.
[PATCH 3/4] TOMOYO: Remember the proposed domain while in execve() request.
[PATCH 4/4] TOMOYO: Allow caching policy manager's state until execve() request.

 b/fs/exec.c                |    1
 b/include/linux/security.h |   11 +++
 b/kernel/fork.c            |    7 +
 b/security/capability.c    |    5 +
 b/security/security.c      |    5 +
 b/security/tomoyo/common.c |   22 +++++-
 b/security/tomoyo/common.h |   34 +++++++++
 b/security/tomoyo/tomoyo.c |  163 +++++++++++++++++++++++++++++++++++++++++++--
 include/linux/security.h   |   10 ++
 security/capability.c      |    6 +
 security/security.c        |    5 +
 security/tomoyo/common.h   |    6 +
 security/tomoyo/tomoyo.c   |   32 ++++++++
 13 files changed, 298 insertions(+), 9 deletions(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-11-02  5:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-17 11:35 [PATCH 0/4] LSM/TOMOYO: Stop using per a cred variables and start using per a task_struct variables Tetsuo Handa
2013-10-17 11:37 ` [PATCH 1/4] LSM: Add security_bprm_aborting_creds() hook Tetsuo Handa
2013-10-17 20:10   ` Eric W. Biederman
2013-10-18 12:42     ` Tetsuo Handa
2013-10-18 23:47       ` Eric W. Biederman
2013-10-17 11:38 ` [PATCH 2/4] LSM: Revive security_task_alloc() hook Tetsuo Handa
2013-10-17 11:40 ` [PATCH 3/4] TOMOYO: Remember the proposed domain while in execve() request Tetsuo Handa
2013-10-17 11:41 ` [PATCH 4/4] TOMOYO: Allow caching policy manager's state until " Tetsuo Handa
2013-10-30 13:21 ` [PATCH 0/4] LSM/TOMOYO: Stop using per a cred variables and start using per a task_struct variables Tetsuo Handa
2013-10-31 14:19   ` James Morris
2013-11-02  5:53     ` [PATCH 0/4] LSM/TOMOYO: Stop using per a cred variables andstart " Tetsuo Handa
  -- strict thread matches above, loose matches on Subject: below --
2013-06-11 13:11 [PATCH 0/4] LSM/TOMOYO: Introduce " Tetsuo Handa
2013-06-11 13:12 ` [PATCH 1/4] LSM: Add security_bprm_aborting_creds() hook Tetsuo Handa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.