forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrity Policy Enforcement (IPE) is an LSM that provides an complimentary approach to Mandatory Access Control than existing LSMs today. Existing LSMs have centered around the concept of access to a resource should be controlled by the current user's credentials. IPE's approach, is that access to a resource should be controlled by the system's trust of a current resource. The basis of this approach is defining a global policy to specify which resource can be trusted. Signed-off-by: Deven Bowers <[email protected]> Signed-off-by: Fan Wu <[email protected]> [PM: subject line tweak] Signed-off-by: Paul Moore <[email protected]>
- Loading branch information
1 parent
9ee6881
commit 0311507
Showing
9 changed files
with
97 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# SPDX-License-Identifier: GPL-2.0-only | ||
# | ||
# Integrity Policy Enforcement (IPE) configuration | ||
# | ||
|
||
menuconfig SECURITY_IPE | ||
bool "Integrity Policy Enforcement (IPE)" | ||
depends on SECURITY && SECURITYFS | ||
select PKCS7_MESSAGE_PARSER | ||
select SYSTEM_DATA_VERIFICATION | ||
help | ||
This option enables the Integrity Policy Enforcement LSM | ||
allowing users to define a policy to enforce a trust-based access | ||
control. A key feature of IPE is a customizable policy to allow | ||
admins to reconfigure trust requirements on the fly. | ||
|
||
If unsure, answer N. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
# | ||
# Copyright (C) 2020-2024 Microsoft Corporation. All rights reserved. | ||
# | ||
# Makefile for building the IPE module as part of the kernel tree. | ||
# | ||
|
||
obj-$(CONFIG_SECURITY_IPE) += \ | ||
ipe.o \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* Copyright (C) 2020-2024 Microsoft Corporation. All rights reserved. | ||
*/ | ||
#include <uapi/linux/lsm.h> | ||
|
||
#include "ipe.h" | ||
|
||
static struct lsm_blob_sizes ipe_blobs __ro_after_init = { | ||
}; | ||
|
||
static const struct lsm_id ipe_lsmid = { | ||
.name = "ipe", | ||
.id = LSM_ID_IPE, | ||
}; | ||
|
||
static struct security_hook_list ipe_hooks[] __ro_after_init = { | ||
}; | ||
|
||
/** | ||
* ipe_init() - Entry point of IPE. | ||
* | ||
* This is called at LSM init, which happens occurs early during kernel | ||
* start up. During this phase, IPE registers its hooks and loads the | ||
* builtin boot policy. | ||
* | ||
* Return: | ||
* * %0 - OK | ||
* * %-ENOMEM - Out of memory (OOM) | ||
*/ | ||
static int __init ipe_init(void) | ||
{ | ||
security_add_hooks(ipe_hooks, ARRAY_SIZE(ipe_hooks), &ipe_lsmid); | ||
|
||
return 0; | ||
} | ||
|
||
DEFINE_LSM(ipe) = { | ||
.name = "ipe", | ||
.init = ipe_init, | ||
.blobs = &ipe_blobs, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* | ||
* Copyright (C) 2020-2024 Microsoft Corporation. All rights reserved. | ||
*/ | ||
|
||
#ifndef _IPE_H | ||
#define _IPE_H | ||
|
||
#ifdef pr_fmt | ||
#undef pr_fmt | ||
#endif | ||
#define pr_fmt(fmt) "ipe: " fmt | ||
|
||
#include <linux/lsm_hooks.h> | ||
|
||
#endif /* _IPE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters