Re: [PATCH RFC] perf_event: Add support for LSM and SELinux checks

2019-10-09 Thread James Morris
On Wed, 9 Oct 2019, Casey Schaufler wrote: > On 10/9/2019 3:14 PM, James Morris wrote: > > On Wed, 9 Oct 2019, Casey Schaufler wrote: > > > >> Please consider making the perf_alloc security blob maintained > >> by the infrastructure rather than the indivi

Re: [PATCH RFC] perf_event: Add support for LSM and SELinux checks

2019-10-09 Thread James Morris
on't need the extra code & complexity. Stacking should only cover what's concretely required by in-tree users. -- James Morris

Re: [PATCH RFC] perf_event: Add support for LSM and SELinux checks

2019-10-09 Thread James Morris
return call_int_hook(locked_down, 0, what); > } > EXPORT_SYMBOL(security_locked_down); Please avoid unrelated whitespace changes. -- James Morris

Re: [GIT PULL][SECURITY] Kernel lockdown patches for v5.4

2019-09-29 Thread James Morris
ectionable. > > So it's merged now. Thanks. Matthew has agreed to maintain this code now that it's merged. Matthew: please submit a maintainer entry for this. -- James Morris

Re: [GIT PULL] SafeSetID LSM changes for 5.4

2019-09-23 Thread James Morris
at SafeSetID is shipping in ChromeOS -- this was part of the rationale for merging it. -- James Morris

[GIT PULL][SECURITY] Kernel lockdown patches for v5.4

2019-09-10 Thread James Morris
Hi Linus, This is the latest iteration of the kernel lockdown patchset, from Matthew Garrett, David Howells and others. >From the original description: This patchset introduces an optional kernel lockdown feature, intended to strengthen the boundary between UID 0 and the kernel. When

Re: [PATCH 0/2] Minor lockdown fixups

2019-09-10 Thread James Morris
On Tue, 10 Sep 2019, Matthew Garrett wrote: > Constify some arrays and fix an #ifdef that I typoed. > Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-lockdown and next-testing -- James Morris

Re: [PATCH v2 1/5] fs: Add support for an O_MAYEXEC flag on sys_open()

2019-09-09 Thread James Morris
On Mon, 9 Sep 2019, Mickaël Salaün wrote: > > On 06/09/2019 21:03, James Morris wrote: > > On Fri, 6 Sep 2019, Jeff Layton wrote: > > > >> The fact that open and openat didn't vet unknown flags is really a bug. > >> > >> Too late to fix it no

Re: [PATCH v2 0/5] Add support for O_MAYEXEC

2019-09-08 Thread James Morris
en you could have IMA measure/appraise all files with +x. I suspect this could get messy in terms of unwanted files being included, and the MAY_OPENEXEC flag has cleaner semantics. -- James Morris

Re: [PATCH v2 1/5] fs: Add support for an O_MAYEXEC flag on sys_open()

2019-09-06 Thread James Morris
There's little need to continue these sorts of > hacks. > > New open flags really have no place in the old syscalls, IMO. Agree here. It's unfortunate but a reality and Linus will reject any such changes which break existing userspace. -- James Morris

Re: linux-next: build failure after merge of the security tree

2019-08-21 Thread James Morris
On Mon, 19 Aug 2019, Stephen Rothwell wrote: > > > 2.20.1 > > I am still applying that patch ... > Matthew folded it into commit e6b1db98cf4d54d9ea59cfcc195f70dc946fdd38. -- James Morris

Re: [PATCH V40 00/29] Add kernel lockdown functionality

2019-08-20 Thread James Morris
ing the oops in tracefs. Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-lockdown and next-testing Thanks! -- James Morris

Re: [PATCH V38 00/29] security: Add support for locking down the kernel

2019-08-12 Thread James Morris
On Tue, 13 Aug 2019, James Morris wrote: > On Mon, 12 Aug 2019, Matthew Garrett wrote: > > > On Fri, Aug 9, 2019 at 11:08 PM James Morris wrote: > > > Please verify and test, as I had to make a few minor fixups for my v5.2 > > > base. > > > > Thanks J

Re: [PATCH V38 00/29] security: Add support for locking down the kernel

2019-08-12 Thread James Morris
On Mon, 12 Aug 2019, Matthew Garrett wrote: > On Fri, Aug 9, 2019 at 11:08 PM James Morris wrote: > > Please verify and test, as I had to make a few minor fixups for my v5.2 > > base. > > Thanks James - there's a few small fixups required, would you like > those as sepa

Re: [PATCH V38 00/29] security: Add support for locking down the kernel

2019-08-10 Thread James Morris
minor fixups for my v5.2 base. -- James Morris

Re: [PATCH V37 04/29] Enforce module signatures if the kernel is locked down

2019-08-08 Thread James Morris
be mentioned in the CONFIG_MODULE_SIG Kconfig > help? I agree and yes mention it in the help. A respin of just this patch is fine. -- James Morris

Re: [PATCH V38 19/29] Lock down module params that specify hardware parameters (eg. ioport)

2019-08-08 Thread James Morris
er than that: > > Acked-by: Jessica Yu > Matthew: no need to respin the patchset just for this. -- James Morris

Re: [PATCH V35 19/29] Lock down module params that specify hardware parameters (eg. ioport)

2019-07-15 Thread James Morris
ecurity/lockdown/lockdown.c > index 07a49667f234..065432f9e218 100644 > --- a/security/lockdown/lockdown.c > +++ b/security/lockdown/lockdown.c > @@ -28,6 +28,7 @@ static char > *lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1] = { > [LOCKDOWN_ACPI_TABLES] = "modified ACPI tables", > [LOCKDOWN_PCMCIA_CIS] = "direct PCMCIA CIS storage", > [LOCKDOWN_TIOCSSERIAL] = "reconfiguration of serial port IO", > + [LOCKDOWN_MODULE_PARAMETERS] = "unsafe module parameters", > [LOCKDOWN_INTEGRITY_MAX] = "integrity", > [LOCKDOWN_CONFIDENTIALITY_MAX] = "confidentiality", > }; > -- James Morris

Re: [PATCH V35 26/29] debugfs: Restrict debugfs when the kernel is locked down

2019-07-15 Thread James Morris
/security.h > +++ b/include/linux/security.h > @@ -115,6 +115,7 @@ enum lockdown_reason { > LOCKDOWN_TIOCSSERIAL, > LOCKDOWN_MODULE_PARAMETERS, > LOCKDOWN_MMIOTRACE, > + LOCKDOWN_DEBUGFS, > LOCKDOWN_INTEGRITY_MAX, > LOCKDOWN_KCORE, > LOCKDOWN_KPROBES, > diff --git a/security/lockdown/lockdown.c b/security/lockdown/lockdown.c > index e43c9d001e49..37ef46320ef4 100644 > --- a/security/lockdown/lockdown.c > +++ b/security/lockdown/lockdown.c > @@ -30,6 +30,7 @@ static char > *lockdown_reasons[LOCKDOWN_CONFIDENTIALITY_MAX+1] = { > [LOCKDOWN_TIOCSSERIAL] = "reconfiguration of serial port IO", > [LOCKDOWN_MODULE_PARAMETERS] = "unsafe module parameters", > [LOCKDOWN_MMIOTRACE] = "unsafe mmio", > + [LOCKDOWN_DEBUGFS] = "debugfs access", > [LOCKDOWN_INTEGRITY_MAX] = "integrity", > [LOCKDOWN_KCORE] = "/proc/kcore access", > [LOCKDOWN_KPROBES] = "use of kprobes", > -- James Morris

Re: [PATCH v5 01/12] S.A.R.A.: add documentation

2019-07-12 Thread James Morris
), so it's more than just inspired. Could you include more information in the description about what's been ported from PaX to SARA? -- James Morris

Re: [PATCH v5 03/12] S.A.R.A.: cred blob management

2019-07-12 Thread James Morris
pr_crit("impossible to initialize creds.\n"); > + goto error; > + } > + > +int __init sara_data_init(void) > +{ > + security_add_hooks(data_hooks, ARRAY_SIZE(data_hooks), "sara"); > + return 0; > +} This can't fail so make it return void and simplify the caller. -- James Morris

Re: [RFC PATCH] fanotify, inotify, dnotify, security: add security hook for fs notifications

2019-07-11 Thread James Morris
is is an issue. Also in the description, please explain the issues with read and write notifications and why a simple 'read' permission is not adequate. -- James Morris

[GIT PULL] LSM: capabilities updates for v5.3

2019-07-09 Thread James Morris
Please pull these minor fixes for capabilities: o Update the commoncap.c code to utilize XATTR_SECURITY_PREFIX_LEN, from Carmeli tamir. o Make the capability hooks static, from Yue Haibing. --- The following changes since commit e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd: Linux 5.1

Re: [PATCH] security/commoncap: Use xattr security prefix len

2019-07-06 Thread James Morris
it next-lsm Thanks! -- James Morris

Re: [PATCH v5 00/12] S.A.R.A. a new stacked LSM

2019-07-06 Thread James Morris
On Sat, 6 Jul 2019, Salvatore Mesoraca wrote: > S.A.R.A. (S.A.R.A. is Another Recursive Acronym) is a stacked Linux Please make this just SARA. Nobody wants to read or type S.A.R.A. -- James Morris

Re: [PATCH V33 24/30] bpf: Restrict bpf when kernel lockdown is in confidentiality mode

2019-06-27 Thread James Morris
o take over lockdown decisions once it has initialized (including > policy load), and to be able to access state that is currently private to the > lockdown module, like the level. Why not utilize stacking (restrictively), similarly to capabilities? -- James Morris

Re: [PATCH V33 24/30] bpf: Restrict bpf when kernel lockdown is in confidentiality mode

2019-06-26 Thread James Morris
king user > policies that are based on LSMs that offer excessively fine > granularity. Can you give an example of how the details might change? > I'd be more comfortable if the LSM only got to see "confidentiality" > or "integrity". These are not sufficient for creating a useful policy for the SELinux case. -- James Morris

Re: [PATCH V34 00/29] Lockdown as an LSM

2019-06-25 Thread James Morris
chset description and had not looked at V33 yet. This is looking good. -- James Morris

Re: [PATCH V34 00/29] Lockdown as an LSM

2019-06-24 Thread James Morris
ot;all or nothing" choices which may prevent deployment due to a user needing to allow (presumably controlled or mitigated) exceptions to the policy. -- James Morris

Re: [PATCH] integrity: Fix __integrity_init_keyring() section mismatch

2019-06-17 Thread James Morris
o inline __integrity_init_keyring(), > a warning is issued. > > Fix this by adding the missing __init annotation. > > Fixes: 9dc92c45177ab70e ("integrity: Define a trusted platform keyring") > Signed-off-by: Geert Uytterhoeven Reviewed-by: James Morris -- James Morris

RE: [RFC PATCH 0/1] security: add SECURE_KEEP_FSUID to preserve fsuid/fsgid across execve

2019-06-14 Thread James Morris
On Sat, 15 Jun 2019, Lubashev, Igor wrote: > > On Friday, June 14, 2019, James Morris wrote: > Unfortunately, perf is using uid==0 and euid==0 as a "capability bits". > > > In tools/perf/util/evsel.c: > static bool perf_event_can_profile_kernel(void) &

Re: [RFC PATCH 0/1] security: add SECURE_KEEP_FSUID to preserve fsuid/fsgid across execve

2019-06-13 Thread James Morris
ther thing to consider when trying to reason about this. Have you considered the example security configuration in Documentation/admin-guide/perf-security.rst ? What are some other examples of programs that could utilize this scheme? -- James Morris

Re: [RFC PATCH 0/1] security: add SECURE_KEEP_FSUID to preserve fsuid/fsgid across execve

2019-06-13 Thread James Morris
. > > I will update man pages, if this patch is deemed a good idea. > > Igor Lubashev (1): > security: add SECURE_KEEP_FSUID to preserve fsuid/fsgid across execve > > include/uapi/linux/securebits.h | 10 +- > security/commoncap.c | 9 +++-- > 2 files changed, 16 insertions(+), 3 deletions(-) > > -- James Morris

Re: [PATCH V8 3/3] Call ima_kexec_cmdline to measure the cmdline args

2019-06-13 Thread James Morris
by: Prakhar Srivastava > --- > kernel/kexec_file.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) Reviewed-by: James Morris -- James Morris

Re: [PATCH V8 2/3] Define a new ima template field buf

2019-06-13 Thread James Morris
' > > Signed-off-by: Prakhar Srivastava > Reviewed-by: Roberto Sassu Reviewed-by: James Morris -- James Morris

Re: [PATCH V8 1/3] Define a new IMA hook to measure the boot command line arguments

2019-06-13 Thread James Morris
a_event_data event_data = {.iint = iint }; Minor nit: looks like this could be simplified to: struct integrity_iint_cache iint = {}; struct ima_event_data event_data = {.iint = }; which also saves the later memset. 'hash' can also be initialized with '= {}'. -- James Morris

Re: [PATCH -next] security: Make capability_hooks static

2019-06-11 Thread James Morris
| 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks! Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-lsm -- James Morris

Re: [PATCH] Smack: Restore the smackfsdef mount option and add missing prefixes

2019-06-03 Thread James Morris
On Fri, 31 May 2019, David Howells wrote: > Should this go via Al's tree, James's tree, Casey's tree or directly to Linus? If it's specific to one LSM (as this is), via Casey, who can decide to forward to Al or Linus. -- James Morris

Re: [GIT PULL] keys: Miscellany

2019-05-30 Thread James Morris
On Wed, 29 May 2019, David Howells wrote: > Hi James, > > Here are some miscellaneous keyrings fixes and improvements intended for > the next merge window, if you could pull them please. > Linus has asked for security subsystem PRs to go directly to him. -- James Morris

Re: [PATCH 7/7] keys: Grant Link permission to possessers of request_key auth keys

2019-05-28 Thread James Morris
and not all the daemon's pending auth keys. > > Signed-off-by: David Howells Reviewed-by: James Morris -- James Morris

Re: [PATCH 6/7] keys: Add a keyctl to move a key between keyrings

2019-05-28 Thread James Morris
ef_to_ptr(from_ref), > +key_ref_to_ptr(to_ref), flags); > + > + key_ref_put(to_ref); > +error3: > + key_ref_put(from_ref); > +error2: > + key_ref_put(key_ref); > +error: > + return ret; > +} > + -- James Morris

Re: [PATCH 5/7] keys: Make __key_link_begin() handle lockdep nesting

2019-05-28 Thread James Morris
On Wed, 22 May 2019, David Howells wrote: > Make __key_link_begin() handle lockdep nesting for the implementation of > key_move() where we have to lock two keyrings. > > Signed-off-by: David Howells Reviewed-by: James Morris -- James Morris

Re: [PATCH 4/7] keys: Break bits out of key_unlink()

2019-05-28 Thread James Morris
On Wed, 22 May 2019, David Howells wrote: > Break bits out of key_unlink() into helper functions so that they can be > used in implementing key_move(). > > Signed-off-by: David Howells Reviewed-by: James Morris -- James Morris

Re: [PATCH 2/7] keys: sparse: Fix incorrect RCU accesses

2019-05-24 Thread James Morris
avid Howells Reviewed-by: James Morris -- James Morris

Re: [PATCH 3/7] keys: sparse: Fix kdoc mismatches

2019-05-24 Thread James Morris
On Wed, 22 May 2019, David Howells wrote: > Fix some kdoc argument description mismatches reported by sparse and give > keyring_restrict() a description. > > Signed-off-by: David Howells > cc: Mat Martineau Reviewed-by: James Morris -- James Morris

Re: [PATCH 1/7] keys: sparse: Fix key_fs[ug]id_changed()

2019-05-24 Thread James Morris
r. > > Signed-off-by: David Howells Reviewed-by: James Morris -- James Morris

Re: [RFC] Turn lockdown into an LSM

2019-05-22 Thread James Morris
s are registered for the hooks, possibly by having the lockdown LSM gate this and update the securityfs lockdown node with something like "lsm:smack". -- James Morris

Re: [RFC] Turn lockdown into an LSM

2019-05-22 Thread James Morris
value for the subject and then apply policy as needed (e.g. allow or deny these). > So I guess my proposal is: use LSM, but make the hook very coarse > grained: int security_violate_confidentiality(const struct cred *) and > int security_violate_integrity(const struct cred *). Perhaps security_kernel_unlock_* -- James Morris

Re: [RFC 2/2] Add the ability to lock down access to the running kernel image

2019-05-21 Thread James Morris
On Tue, 21 May 2019, Matthew Garrett wrote: > + int (*locked_down)(const char *where, enum lockdown_level level); > +static int lockdown_is_locked_down(const char *what, enum lockdown_level > level) I'm guessing 'what' is the best option here. -- James Morris

Re: [RFC] Turn lockdown into an LSM

2019-05-21 Thread James Morris
make it easier to write policy in other LSMs, but > does this broadly look like you were imagining? This looks promising! An LSM could also potentially implement its own policy for the hook. -- James Morris

Re: SGX vs LSM (Re: [PATCH v20 00/28] Intel SGX1 support)

2019-05-16 Thread James Morris
On Wed, 15 May 2019, Andy Lutomirski wrote: > On Wed, May 15, 2019 at 3:46 PM James Morris wrote: > > > > You could try user.sigstruct, which does not require any privs. > > > > I don't think I understand your proposal. What file would this > attribute be on? Wh

Re: SGX vs LSM (Re: [PATCH v20 00/28] Intel SGX1 support)

2019-05-15 Thread James Morris
to set up a loose policy where > anyone can load whatever enclave they want. That's what would happen > in my proposal if there was no LSM loaded or of the LSM policy didn't > restrict what .sigstruct files were acceptable. > You could try user.sigstruct, which does not require any privs. -- James Morris

Re: SGX vs LSM (Re: [PATCH v20 00/28] Intel SGX1 support)

2019-05-15 Thread James Morris
seful to prevent enclaves from > contain RWX segments. > > So my question is: what, if anything, should change to make this work better? Would it be possible to provide multiple fds (perhaps via a pseudo fs interface) which can be mapped to different types of VMAs? -- James Morris

Re: [GIT PULL] security subsystem: Tomoyo updates for v5.2

2019-05-13 Thread James Morris
On Tue, 14 May 2019, James Morris wrote: > On Sat, 11 May 2019, Linus Torvalds wrote: > > So now these have been very recently rebased (on top of a random > > merge-window "tree of the day" version) instead of having multiple > > merges. > > > > That

Re: [GIT PULL] security subsystem: Tomoyo updates for v5.2

2019-05-13 Thread James Morris
lso need to be guided in, as part of a community effort. -- James Morris

Re: [GIT PULL] security subsystem: Tomoyo updates for v5.2

2019-05-13 Thread James Morris
On Sat, 11 May 2019, Linus Torvalds wrote: > On Fri, May 10, 2019 at 6:09 PM James Morris wrote: > > > > These patches include fixes to enable fuzz testing, and a fix for > > calculating whether a filesystem is user-modifiable. > > So now these have been ve

[GIT PULL] security subsystem: Tomoyo updates for v5.2

2019-05-10 Thread James Morris
Please pull. These patches include fixes to enable fuzz testing, and a fix for calculating whether a filesystem is user-modifiable. The following changes since commit 1fb3b526df3bd7647e7854915ae6b22299408baf: Merge tag 'docs-5.2a' of git://git.lwn.net/linux (2019-05-10 13:24:53 -0400) are

Re: [GIT PULL] security subsytem: TPM changes for v5.2

2019-05-09 Thread James Morris
On Thu, 9 May 2019, Linus Torvalds wrote: > On Thu, May 9, 2019 at 10:23 AM James Morris wrote: > > > > Bugfixes and new selftests for v5.1 features (partial reads in /dev/tpm0). > > What the heck is going on? > > I got all of these long ago in the "TPM fixes&

[GIT PULL] Security subsystem: Smack updates for v5.2

2019-05-09 Thread James Morris
r/next-smack into next-smack (2019-05-06 20:24:51 -0700) Casey Schaufler (3): Smack: Create smack_rule cache to optimize memory usage Smack: Fix IPv6 handling of 0 secmark Smack: Fix kbuild reported build

[GIT PULL] security subsytem: TPM changes for v5.2

2019-05-09 Thread James Morris
700) ---- James Morris (1): Merge tag 'tpmdd-next-20190329' of git://git.infradead.org/users/jjs/linux-tpmdd into next-tpm Jarkko Sakkinen (2): KEYS: trusted: allow trusted.ko to initialize w/o a TPM tpm: turn on TPM on suspend for TPM 1.x Tade

[GIT PULL] Security subsystem: integrity updates for v5.2

2019-05-09 Thread James Morris
/git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into next-integrity (2019-04-12 15:20:23 -0700) -------- James Morris (1): Merge branch 'next-integrity-for-james' of git://git.kernel.org/.../zohar/linux-integrity into next-i

[GIT PULL] Security subsystem: general updates for v5.2

2019-05-06 Thread James Morris
documentation for the audit_* hooks LSM: fix documentation for the msg_queue_* hooks LSM: fix documentation for the sem_* hooks LSM: fix documentation for the shm_* hooks LSM: lsm_hooks.h: fix documentation format James Morris (2): Merge tag 'v5.1-rc2' into next-general

Re: [PATCH V32 01/27] Add the ability to lock down access to the running kernel image

2019-05-02 Thread James Morris
On Thu, 2 May 2019, Matthew Garrett wrote: > On Thu, May 2, 2019 at 2:07 PM James Morris wrote: > > One possible direction is to (as previously mentioned) assign IDs to each > > callsite and be able to check this ID against a simple policy array > > (allow/deny). The d

Re: [PATCH V32 01/27] Add the ability to lock down access to the running kernel image

2019-05-02 Thread James Morris
ckdown callsites as they don't have to be enabled by the user. Thoughts? -- James Morris

Re: [RFC PATCH 2/7] x86/sci: add core implementation for system call isolation

2019-04-29 Thread James Morris
sed for data, and memory used for code and control >flow. Might be better to start with Rust. -- James Morris

Re: [PATCH v2 2/5 RFC] use event name instead of enum to make the call generic

2019-04-25 Thread James Morris
e DMARC, you're expected to have DKIM working for spam > purposes. On the other hand, if you don't advertise DMARC, google will > probably still bin all your email as spam. Working on it. -- James Morris

Re: [PATCH v2 2/5 RFC] use event name instead of enum to make the call generic

2019-04-25 Thread James Morris
ot;v=DMARC1;p=none;pct=100;rua=mailto:jamor...@microsoft.com; We don't have DKIM set up yet. -- James Morris

Re: [PATCH 2/2] seccomp: Make NEW_LISTENER and TSYNC flags exclusive

2019-04-24 Thread James Morris
s Cook Acked-by: James Morris -- James Morris

Re: [PATCH 1/2] selftests/seccomp: Prepare for exclusive seccomp flags

2019-04-24 Thread James Morris
On Wed, 24 Apr 2019, Kees Cook wrote: > Some seccomp flags will become exclusive, so the selftest needs to > be adjusted to mask those out and test them individually for the "all > flags" tests. > > Cc: sta...@vger.kernel.org # v5.0+ > Signed-off-by: Kees Co

Re: [PATCH 1/2] seccomp: fix up grammar in comment

2019-04-23 Thread James Morris
ked-by: Kees Cook > > James, this can go in for v5.2 -- no rush. > Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general -- James Morris

Re: [PATCH 2/2] seccomp: disallow NEW_LISTENER and TSYNC flags

2019-04-23 Thread James Morris
filter(filter); > > if (IS_ERR(prepared)) > > @@ -1302,7 +1315,7 @@ static long seccomp_set_mode_filter(unsigned int > > flags, > > mutex_unlock(>signal->cred_guard_mutex); > > out_put_fd: > > if (flags & SECCOMP_FILTER_FLAG_NEW_LISTENER) { > > - if (ret < 0) { > > + if (ret) { > > listener_f->private_data = NULL; > > fput(listener_f); > > put_unused_fd(listener); > > -- > > 2.19.1 > > > > -Kees > > -- James Morris

Re: [PATCH] KEYS: Make use of platform keyring for module signature verify

2019-04-23 Thread James Morris
NULL, NULL); > + if (ret == -ENOKEY && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) { > + ret = verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len, > + VERIFY_USE_PLATFORM_KEYRING, > +

Re: [PATCH] security: inode: fix a missing check for securityfs_create_file

2019-04-10 Thread James Morris
{"lsm", _ops, 0444}, > #endif > {""} > }; > > and to hell with that call of securityfs_create_file() and all its > failure handling... Thanks for the review. Reverted. -- James Morris

Re: [PATCH] Yama: mark function as static

2019-04-10 Thread James Morris
On Wed, 27 Mar 2019, Mukesh Ojha wrote: > Sparse complains yama_task_prctl can be static. Fix it by making > it static. > > Signed-off-by: Mukesh Ojha Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general -- James Morris

Re: [PATCH] security: inode: fix a missing check for securityfs_create_file

2019-04-10 Thread James Morris
r_filesystem(_type); > + sysfs_remove_mount_point(kernel_kobj, "security"); > + return PTR_ERR(lsm_dentry); > + } > #endif > return 0; > } > -- James Morris

Re: [PATCH] keys: safe concurrent user->{session,uid}_keyring access

2019-04-10 Thread James Morris
smp_store_release() for writers to > prevent memory ordering issues. > > Fixes: 69664cf16af4 ("keys: don't generate user and user session keyrings > unless they're accessed") > Signed-off-by: Jann Horn Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/l

Re: [PATCH] security: don't use RCU accessors for cred->session_keyring

2019-04-10 Thread James Morris
ers that use __rcu. > > Signed-off-by: Jann Horn Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general -- James Morris

Re: [PATCH] Yama: mark local symbols as static

2019-04-10 Thread James Morris
morris/linux-security.git next-general -- James Morris

Re: [PATCH] apparmor: Restore Y/N in /sys for apparmor's "enabled"

2019-04-09 Thread James Morris
t; userspace regression reported by David. > > > --- > > > security/apparmor/lsm.c | 49 - > > > 1 file changed, 48 insertions(+), 1 deletion(-) > > > > This looks good to me. Thanks a lot! If this makes v5.1, I will leave > > the apparmor-detection in dbus-broker as it is, unless someone asks me > > to parse 0/1 as well? > > > > I cannot judge whether the apparmor_initialized check is correct, but > > for the parameter parsing: > > > > Reviewed-by: David Rheinsberg > > Thanks! > > James, are you able to take this for v5.1 fixes? Actually, JJ usually submits directly to Linus. -- James Morris

Re: [PATCH] apparmor: Restore Y/N in /sys for apparmor's "enabled"

2019-04-09 Thread James Morris
t; userspace regression reported by David. > > > --- > > > security/apparmor/lsm.c | 49 - > > > 1 file changed, 48 insertions(+), 1 deletion(-) > > > > This looks good to me. Thanks a lot! If this makes v5.1, I will leave > > the apparmor-detection in dbus-broker as it is, unless someone asks me > > to parse 0/1 as well? > > > > I cannot judge whether the apparmor_initialized check is correct, but > > for the parameter parsing: > > > > Reviewed-by: David Rheinsberg > > Thanks! > > James, are you able to take this for v5.1 fixes? Sure. -- James Morris

[GIT PULL] TPM fixes for v5.1

2019-04-08 Thread James Morris
Please pull these TPM fixes, from Jarkko: "These are critical fixes for v5.1. Contains also couple of new selftests for v5.1 features (partial reads in /dev/tpm0)." --- The following changes since commit fd008d1a7a204695f0e5e003af16448bb9c34b7b: Merge branch 'linus' of

[GIT PULL][UPDATED] security: yama and LSM config fixes

2019-03-29 Thread James Morris
Please pull these fixes for v5.1. The following changes since commit 8c7ae38d1ce12a0eaeba655df8562552b3596c7f: afs: Fix StoreData op marshalling (2019-03-28 08:54:20 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git

Re: [GIT PULL] tpmdd fixes for Linux v5.1

2019-03-29 Thread James Morris
inux/kernel/git/jmorris/linux-security.git next-tpm -- James Morris

[GIT PULL] security: yama fix for v5.1

2019-03-29 Thread James Morris
/20190326230841.87834-1-ja...@google.com Link: https://lkml.kernel.org/r/1553673018-19234-1-git-send-email-mo...@codeaurora.org Signed-off-by: Kees Cook Signed-off-by: James Morris diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c index 57cc60722dd3..efac68556b45 100644

Re: Linux 5.1-rc2

2019-03-29 Thread James Morris
cept when selected by CONFIG_DEFAULT_SECURITY_TOMOYO? (I worry > the latter will lead to less testing of the stacking.) Kees, send me your final patch as soon as it's ready. -- James Morris

Re: [PATCH 23/27] bpf: Restrict kernel image access functions when the kernel is locked down

2019-03-28 Thread James Morris
On Thu, 28 Mar 2019, Matthew Garrett wrote: > On Wed, Mar 27, 2019 at 8:15 PM James Morris wrote: > > OTOH, this seems like a combination of mechanism and policy. The 3 modes > > are a help here, but I wonder if they may be too coarse grained still, > > e.g. if someone want

Re: [PATCH V31 25/25] debugfs: Disable open() when kernel is locked down

2019-03-27 Thread James Morris
't care :) Why do you think it's crazy? -- James Morris

Re: [PATCH v2 00/11] LSM documentation update

2019-03-26 Thread James Morris
paratedly. Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general Thanks! -- James Morris

Re: Linux 5.1-rc2

2019-03-25 Thread James Morris
ill looking for the patch that restores the various > CONFIG_DEFAULT_ kconfig options to be merged. > > https://lore.kernel.org/linux-security-module/2bf23acd-22c4-a260-7648-845887a40...@i-love.sakura.ne.jp/ > > since commit 70b62c25665f636c9f6c700b26af7df296b0887e dropped them somehow. AFAICT we don't have a finalized version of the patch yet. Kees? -- James Morris

Re: [PATCH] security: inode: fix a missing check for securityfs_create_file

2019-03-15 Thread James Morris
gt; return 0; > } > Good catch, but you should propagate the error returned from securityfs_create_file(). -- James Morris

Re: [PATCH 03/27] Enforce module signatures if the kernel is locked down

2019-03-08 Thread James Morris
On Fri, 8 Mar 2019, Matthew Garrett wrote: > On Fri, Mar 8, 2019 at 3:00 PM James Morris wrote: > > > > On Wed, 6 Mar 2019, Matthew Garrett wrote: > > > > > From: David Howells > > > > > > If the kernel is locked down, require that all module

Re: [PATCH 03/27] Enforce module signatures if the kernel is locked down

2019-03-08 Thread James Morris
fying kernel modules. -- James Morris

[GIT PULL] security: tpm subsystem updates for v5.1

2019-03-08 Thread James Morris
jmorris/linux-security.git next-tpm for you to fetch changes up to 5da10728037afea6743b76afddfdc9950cd711b3: Merge tag 'tpmdd-next-20190213' of git://git.infradead.org/users/jjs/linux-tpmdd into next-tpm (2019-02-13 12:01:00 -0800) ------

[GIT PULL] security: integrity subsystem updates for v5.1

2019-03-08 Thread James Morris
to module keyring (2018-12-17 14:09:39 -0800) Dave Howells (2): efi: Add EFI signature data types efi: Add an EFI signature blob parser Eric Richter (1): x86/ima: define arch_get_ima_policy() for x86 James

[GIT PULL] security subsystem changes for v5.1

2019-03-05 Thread James Morris
urity blob Gustavo A. R. Silva (1): security: mark expected switch fall-throughs and add a missing break James Morris (3): Merge tag 'v5.0-rc1' into next-general Merge tag 'blob-stacking-security-next' of https://git.kernel.org/.../kees/linux into next-general Merge tag

Re: [PATCH v2] LSM: Ignore "security=" when "lsm=" is specified

2019-02-25 Thread James Morris
kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general -- James Morris

Re: [PATCH v2] security: mark expected switch fall-throughs and add a missing break

2019-02-22 Thread James Morris
ment may fall through > [-Wimplicit-fallthrough=] > security/apparmor/domain.c:569:6: warning: this statement may fall through > [-Wimplicit-fallthrough=] > Applied to git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general -- James Morris

Re: [PATCH v2] security: mark expected switch fall-throughs and add a missing break

2019-02-22 Thread James Morris
uot;, args[0].from, > >>> entry->fowner_op); > >>> diff --git a/security/integrity/ima/ima_template_lib.c > >>> b/security/integrity/ima/ima_template_lib.c > >>> index 43752002c222..513b457ae900 100644 > >>> --- a/security/integrity/ima/ima_template_lib.c > >>> +++ b/security/integrity/ima/ima_template_lib.c > >>> @@ -83,6 +83,7 @@ static void ima_show_template_data_ascii(struct > >>> seq_file *m, > >>> /* skip ':' and '\0' */ > >>> buf_ptr += 2; > >>> buflen -= buf_ptr - field_data->data; > >>> + /* fall through */ > >>> case DATA_FMT_DIGEST: > >>> case DATA_FMT_HEX: > >>> if (!buflen) > >>> diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c > >>> index 587dc06eba33..5c1613519d5a 100644 > >>> --- a/security/smack/smack_lsm.c > >>> +++ b/security/smack/smack_lsm.c > >>> @@ -3380,13 +3380,12 @@ static void smack_d_instantiate(struct dentry > >>> *opt_dentry, struct inode *inode) > >>>*/ > >>> final = _known_star; > >>> /* > >>> - * Fall through. > >>> - * > >>>* If a smack value has been set we want to use it, > >>>* but since tmpfs isn't giving us the opportunity > >>>* to set mount options simulate setting the > >>>* superblock default. > >>>*/ > >>> + /* Fall through */ > >>> default: > >>> /* > >>>* This isn't an understood special case. > >> > -- James Morris

Re: [PATCH] MAINTAINERS: add linux-security-module mailing list to TPM drivers

2019-02-20 Thread James Morris
'ing there is not very significant, which means that most of > the time the TPM traffic is just noise on that list. Sounds about right, there used to be more security folk on LSM and not as many on the TPM list, but the new integrity list works well for TPM now. -- James Morris

Re: [PATCH] KEYS: user: Align the payload buffer

2019-02-20 Thread James Morris
ot all, arches had a load-word instruction. > > Do you want to send me a patch for that? I'd rather not alter this patch at > this point. I can pass the additional patch to James for the next merge > window. Should this first one go into -rc? -- James Morris

<    1   2   3   4   5   6   7   8   9   10   >