Re: Reducing security.capability xattr checks in audit subsystem?

2023-09-18 Thread Paul Moore
On Mon, Sep 18, 2023 at 7:20 AM Han-Wen Nienhuys wrote: > Hi there, > > I'm troubleshooting a performance problem in FUSE filesystems. At > $DAYJOB, we have a number of FUSE file systems used for development > (eg. serving source code), and we have an auditd configuration so the > security team ca

Re: [nf PATCH 0/3] Review nf_tables audit logging

2023-09-26 Thread Paul Moore
On Fri, Sep 22, 2023 at 9:53 PM Phil Sutter wrote: > > When working on locking for reset commands, some audit log calls had to > be adjusted as well. This series deals with the "fallout" from adding > tests for the changed log calls, dealing with the uncovered issues and > adding more tests. > > P

Re: [RFC PATCH] audit: Send netlink ACK before setting connection in auditd_set

2023-09-26 Thread Paul Moore
On Fri, Sep 22, 2023 at 11:28 AM Chris Riches wrote: > > When auditd_set sets the auditd_conn pointer, audit messages can > immediately be put on the socket by other kernel threads. If the backlog > is large or the rate is high, this can immediately fill the socket > buffer. If the audit daemon re

Re: [nf PATCH 2/3] netfilter: nf_tables: Deduplicate nft_register_obj audit logs

2023-10-03 Thread Paul Moore
+++--- > .../testing/selftests/netfilter/nft_audit.sh | 20 + > 2 files changed, 48 insertions(+), 16 deletions(-) Thanks for working on this Phil, it looks good to me from an audit perspective. Acked-by: Paul Moore (Audit) -- paul-moore.com

Re: [nf PATCH 3/3] netfilter: nf_tables: Audit log object reset once per table

2023-10-03 Thread Paul Moore
off-by: Phil Sutter > --- > net/netfilter/nf_tables_api.c | 51 ++- > .../testing/selftests/netfilter/nft_audit.sh | 46 + > 2 files changed, 74 insertions(+), 23 deletions(-) Thanks Phil. Acked-by: Paul Moore (Audit) -- paul-moore.com

Re: audit: io_uring openat triggers audit reference count underflow in worker thread

2023-10-07 Thread Paul Moore
On Sat, Oct 7, 2023 at 9:11 AM Jens Axboe wrote: > On 10/6/23 8:32 PM, Jens Axboe wrote: > > On 10/6/23 2:09 PM, Dan Clash wrote: ... > > I'm not fully aware of what audit is doing with struct filename outside > > of needing it for the audit log. Rather than impose the atomic > > references for

Re: [RFC PATCH] audit: Send netlink ACK before setting connection in auditd_set

2023-10-11 Thread Paul Moore
On Fri, Sep 22, 2023 at 11:28 AM Chris Riches wrote: > > When auditd_set sets the auditd_conn pointer, audit messages can > immediately be put on the socket by other kernel threads. If the backlog > is large or the rate is high, this can immediately fill the socket > buffer. If the audit daemon re

Re: [PATCH] audit,io_uring: io_uring openat triggers audit reference count underflow

2023-10-13 Thread Paul Moore
On Fri, Oct 13, 2023 at 10:21 AM Jens Axboe wrote: > On 10/13/23 2:24 AM, Christian Brauner wrote: > > On Thu, Oct 12, 2023 at 02:55:18PM -0700, Dan Clash wrote: > >> An io_uring openat operation can update an audit reference count > >> from multiple threads resulting in the call trace below. > >>

Re: [PATCH] audit,io_uring: io_uring openat triggers audit reference count underflow

2023-10-13 Thread Paul Moore
nning to do, but you didn't mention it here. Regardless, as I mentioned in my last email (I think our last emails raced a bit), I'm okay with this change, please add my ACK. Acked-by: Paul Moore > Applied to the vfs.misc branch of the vfs/vfs.git tree. > Patches in the vfs.misc br

Re: [PATCH] audit,io_uring: io_uring openat triggers audit reference count underflow

2023-10-13 Thread Paul Moore
On Fri, Oct 13, 2023 at 12:00 PM Jens Axboe wrote: > On 10/13/23 9:56 AM, Paul Moore wrote: > > * You didn't mention if you've marked this for stable or if you're > > going to send this up to Linus now or wait for the merge window. At a > > minimum this should

Re: [PATCH] audit,io_uring: io_uring openat triggers audit reference count underflow

2023-10-13 Thread Paul Moore
On Fri, Oct 13, 2023 at 12:22 PM Christian Brauner wrote: > > On Fri, Oct 13, 2023 at 11:56:08AM -0400, Paul Moore wrote: > > On Fri, Oct 13, 2023 at 11:44 AM Christian Brauner > > wrote: > > > > > > On Thu, 12 Oct 2023 14:55:18 -0700, Dan Clash wrote: >

Re: [RFC PATCH] audit: Send netlink ACK before setting connection in auditd_set

2023-10-16 Thread Paul Moore
On Mon, Oct 16, 2023 at 1:12 PM Chris Riches wrote: > Thanks for trimming the email in your reply, however, it is helpful to preserve those "On Mon, Oct ..." headers for those emails which you include in your reply, it helps keep things straight when reading the email. Not a big deal, just somet

Re: [RFC PATCH] audit: Send netlink ACK before setting connection in auditd_set

2023-10-17 Thread Paul Moore
On Tue, Oct 17, 2023 at 9:49 AM Chris Riches wrote: > On 16/10/2023 21:16, Paul Moore wrote: > >> While typing it out manually, I noticed that > >> the condition for sending the ACK isn't correct - if NLM_F_ACK is 0 to > >> begin with, then ack will be fals

[PATCH] audit: use mmget() instead of get_task_exe_file() when auditing @current

2023-10-18 Thread Paul Moore
ix exe_file access in audit_exe_compare") Reported-by: Andreas Steinmetz Signed-off-by: Paul Moore --- kernel/audit_watch.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index 65075f1e4ac8..fa3e6ea0e58c 100

Re: [PATCH] audit: use mmget() instead of get_task_exe_file() when auditing @current

2023-10-18 Thread Paul Moore
Updating Mateusz's email. On Wed, Oct 18, 2023 at 6:20 PM Paul Moore wrote: > > The get_task_exe_file() function locks the given task with task_lock() > which when used inside audit_exe_compare() can cause deadlocks on > systems that generate audit records when the task_lock()

Re: [PATCH] audit: use mmget() instead of get_task_exe_file() when auditing @current

2023-10-18 Thread Paul Moore
On Wed, Oct 18, 2023 at 8:22 PM Mateusz Guzik wrote: > On 10/19/23, Paul Moore wrote: > >> The get_task_exe_file() function locks the given task with task_lock() > >> which when used inside audit_exe_compare() can cause deadlocks on > >> systems that generate au

Re: [PATCH] audit: use mmget() instead of get_task_exe_file() when auditing @current

2023-10-19 Thread Paul Moore
On Wed, Oct 18, 2023 at 10:14 PM Mateusz Guzik wrote: > On 10/19/23, Paul Moore wrote: > > On Wed, Oct 18, 2023 at 8:22 PM Mateusz Guzik wrote: > >> On 10/19/23, Paul Moore wrote: > >> >> The get_task_exe_file() function locks the given task with task_lock

Re: [PATCH] audit: use mmget() instead of get_task_exe_file() when auditing @current

2023-10-19 Thread Paul Moore
On Thu, Oct 19, 2023 at 10:52 AM Mateusz Guzik wrote: > On 10/19/23, Paul Moore wrote: > > Thinking about it a bit more this morning, I think we can safely > > ignore the non-@current case in audit_exe_compare() as the whole point > > of the audit exe filter is to record the

Re: [PATCH] audit: use mmget() instead of get_task_exe_file() when auditing @current

2023-10-19 Thread Paul Moore
On Thu, Oct 19, 2023 at 12:56 PM Mateusz Guzik wrote: > On 10/19/23, Paul Moore wrote: > > On Thu, Oct 19, 2023 at 10:52 AM Mateusz Guzik wrote: > >> On 10/19/23, Paul Moore wrote: > >> > Thinking about it a bit more this morning, I think we can safely > >

Re: [PATCH RFC v11 2/19] ipe: add policy parser

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > IPE's interpretation of the what the user trusts is accomplished through > its policy. IPE's design is to not provide support for a single trust > provider, but to support multiple providers to enable the end-user to > choose the best one to seek their needs. >

Re: [PATCH RFC v11 3/19] ipe: add evaluation loop

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > IPE must have a centralized function to evaluate incoming callers > against IPE's policy. This iteration of the policy for against the rules > for that specific caller is known as the evaluation loop. > > Signed-off-by: Deven Bowers > Signed-off-by: Fan Wu > -

Re: [PATCH RFC v11 5/19] ipe: introduce 'boot_verified' as a trust provider

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > IPE is designed to provide system level trust guarantees, this usually > implies that trust starts from bootup with a hardware root of trust, > which validates the bootloader. After this, the bootloader verifies the > kernel and the initramfs. > > As there's no

Re: [PATCH RFC v11 4/19] ipe: add LSM hooks on execution and kernel read

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > IPE's initial goal is to control both execution and the loading of > kernel modules based on the system's definition of trust. It > accomplishes this by plugging into the security hooks for > bprm_check_security, file_mprotect, mmap_file, kernel_load_data, > and

Re: [PATCH RFC v11 9/19] ipe: add permissive toggle

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > IPE, like SELinux, supports a permissive mode. This mode allows policy > authors to test and evaluate IPE policy without it effecting their > programs. When the mode is changed, a 1404 AUDIT_MAC_STATUS > be reported. > > This patch adds the following audit recor

Re: [PATCH RFC v11 11/19] dm verity: set DM_TARGET_SINGLETON feature flag

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > The device-mapper has a flag to mark targets as singleton, which is a > required flag for immutable targets. Without this flag, multiple > dm-verity targets can be added to a mapped device, which has no > practical use cases and will let dm_table_get_immutable_ta

Re: [PATCH RFC v11 8/19] uapi|audit|ipe: add ipe auditing support

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > Users of IPE require a way to identify when and why an operation fails, > allowing them to both respond to violations of policy and be notified > of potentially malicious actions on their systems with respect to IPE > itself. > > This patch introduces 3 new audi

Re: [PATCH RFC v11 12/19] dm: add finalize hook to target_type

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > This patch adds a target finalize hook. > > The hook is triggered just before activating an inactive table of a > mapped device. If it returns an error the __bind get cancelled. > > The dm-verity target will use this hook to attach the dm-verity's > roothash me

Re: [PATCH RFC v11 14/19] ipe: add support for dm-verity as a trust provider

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > Allows author of IPE policy to indicate trust for a singular dm-verity > volume, identified by roothash, through "dmverity_roothash" and all > signed dm-verity volumes, through "dmverity_signature". > > Signed-off-by: Deven Bowers > Signed-off-by: Fan Wu > ---

Re: [PATCH RFC v11 15/19] fsverity: consume builtin signature via LSM hook

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > fsverity represents a mechanism to support both integrity and > authenticity protection of a file, supporting both signed and unsigned > digests. > > An LSM which controls access to a resource based on authenticity and > integrity of said resource, can then use

Re: [PATCH RFC v11 13/19] dm verity: consume root hash digest and signature data via LSM hook

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > dm-verity provides a strong guarantee of a block device's integrity. As > a generic way to check the integrity of a block device, it provides > those integrity guarantees to its higher layers, including the filesystem > level. > > An LSM that control access to a

Re: [PATCH RFC v11 16/19] ipe: enable support for fs-verity as a trust provider

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > Enable IPE policy authors to indicate trust for a singular fsverity > file, identified by the digest information, through "fsverity_digest" > and all files using fsverity's builtin signatures via > "fsverity_signature". > > This enables file-level integrity clai

Re: [PATCH RFC v11 18/19] ipe: kunit test for parser

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > Add various happy/unhappy unit tests for both IPE's parser. I'm going to suggest: "... for IPE's policy parser." Also, aside from the policy parser tests, are there any other IPE functional tests? We do have a testing guideline for new LSM submissions: "New

Re: [PATCH RFC v11 17/19] scripts: add boot policy generation program

2023-10-23 Thread Paul Moore
On Oct 4, 2023 Fan Wu wrote: > > Enables an IPE policy to be enforced from kernel start, enabling access > control based on trust from kernel startup. This is accomplished by > transforming an IPE policy indicated by CONFIG_IPE_BOOT_POLICY into a > c-string literal that is parsed at kernel start

Re: [PATCH] audit: use mmget() instead of get_task_exe_file() when auditing @current

2023-10-24 Thread Paul Moore
On Sat, Oct 21, 2023 at 9:51 AM Mateusz Guzik wrote: > On 10/19/23, Paul Moore wrote: > > On Thu, Oct 19, 2023 at 12:56 PM Mateusz Guzik wrote: > >> On 10/19/23, Paul Moore wrote: > >> > On Thu, Oct 19, 2023 at 10:52 AM Mateusz Guzik > >> > wro

[PATCH v2] audit: don't take task_lock() in audit_exe_compare() code path

2023-10-24 Thread Paul Moore
ve to worry about filtering the currently executing task in audit_exe_compare() we can do away with the task_lock() and call get_mm_exe_file() with @current->mm directly. Cc: Fixes: 5efc244346f9 ("audit: fix exe_file access in audit_exe_compare") Reported-by: Andreas Steinmetz Signed-

Re: [PATCH v2] audit: don't take task_lock() in audit_exe_compare() code path

2023-10-24 Thread Paul Moore
On Tue, Oct 24, 2023 at 12:47 PM John Johansen wrote: > On 10/24/23 09:14, Paul Moore wrote: > > The get_task_exe_file() function locks the given task with task_lock() > > which when used inside audit_exe_compare() can cause deadlocks on > > systems that generate audit recor

[PATCH v3] audit: don't take task_lock() in audit_exe_compare() code path

2023-10-24 Thread Paul Moore
-by: John Johansen Signed-off-by: Paul Moore --- - v3 * added a !current->mm check - v2 * dropped mmget()/mmput() - v1 * initial revision --- kernel/audit_watch.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index 65075

Re: [PATCH v3] audit: don't take task_lock() in audit_exe_compare() code path

2023-10-24 Thread Paul Moore
On Tue, Oct 24, 2023 at 2:39 PM Paul Moore wrote: > > The get_task_exe_file() function locks the given task with task_lock() > which when used inside audit_exe_compare() can cause deadlocks on > systems that generate audit records when the task_lock() is held. We > resolve this p

Re: [PATCH v3] audit: don't take task_lock() in audit_exe_compare() code path

2023-10-24 Thread Paul Moore
ird it took this long for it to surface. Yeah, I thought the same thing. Regardless, thanks for taking the time to review the fix. > On 10/24/23, Paul Moore wrote: > > On Tue, Oct 24, 2023 at 2:39 PM Paul Moore wrote: > >> > >> The get_task_exe_file() function loc

ANN: kernel git branches and process changes

2023-10-25 Thread Paul Moore
Hello all, As of today I'm making some changes to the LSM, SELinux, and audit kernel git repositories to make it easier to get changes into linux-next and to provide a more formal approach to dealing with significant changes that may need some time in a "staging" branch before inclusion into a mai

Re: ANN: kernel git branches and process changes

2023-10-25 Thread Paul Moore
On Wed, Oct 25, 2023 at 9:25 PM Bagas Sanjaya wrote: > On Wed, Oct 25, 2023 at 05:11:51PM -0400, Paul Moore wrote: > > stable-X.Y branch > > > > The stable-X.Y branch is intended for stable kernel patches and is based on > > Linus' X.Y-rc1 tag, or a later X.

Re: [PATCH v3] audit: don't take task_lock() in audit_exe_compare() code path

2023-10-25 Thread Paul Moore
On Tue, Oct 24, 2023 at 2:39 PM Paul Moore wrote: > > The get_task_exe_file() function locks the given task with task_lock() > which when used inside audit_exe_compare() can cause deadlocks on > systems that generate audit records when the task_lock() is held. We > resolve this p

Re: [PATCH RFC v11 2/19] ipe: add policy parser

2023-10-26 Thread Paul Moore
On Wed, Oct 25, 2023 at 6:46 PM Fan Wu wrote: > On 10/23/2023 8:52 PM, Paul Moore wrote: > > On Oct 4, 2023 Fan Wu wrote: > >> > >> IPE's interpretation of the what the user trusts is accomplished through > >> its policy. IPE's design is to not pr

Re: [PATCH RFC v11 5/19] ipe: introduce 'boot_verified' as a trust provider

2023-10-26 Thread Paul Moore
On Thu, Oct 26, 2023 at 5:33 PM Fan Wu wrote: > On 10/23/2023 8:52 PM, Paul Moore wrote: > > On Oct 4, 2023 Fan Wu wrote: > >> > >> IPE is designed to provide system level trust guarantees, this usually > >> implies that trust starts from bootup with

[GIT PULL] audit/audit-pr-20231030

2023-10-30 Thread Paul Moore
-0400) audit/stable-6.7 PR 20231030 Kees Cook (1): audit: Annotate struct audit_chunk with __counted_by Paul Moore (1): audit: don't take task_lock() in audit_exe_compare() code path kernel/audit_tree.c | 2

Re: [PATCH v2] audit: Send netlink ACK before setting connection in auditd_set

2023-11-01 Thread Paul Moore
On Wed, Nov 1, 2023 at 5:59 AM Chris Riches wrote: > > Hi Paul, > > Is there any update on the review of the v2 patch? Hi Chris, I apologize for the delay, this is in my review queue, there is simply a lot going on at the moment and I haven't been able to make as much progress as I would like.

Re: [PATCH RFC v11 15/19] fsverity: consume builtin signature via LSM hook

2023-11-01 Thread Paul Moore
On Mon, Oct 23, 2023 at 11:52 PM Paul Moore wrote: > On Oct 4, 2023 Fan Wu wrote: > > > > fsverity represents a mechanism to support both integrity and > > authenticity protection of a file, supporting both signed and unsigned > > digests. > > > > An

Re: [PATCH RFC v11 11/19] dm verity: set DM_TARGET_SINGLETON feature flag

2023-11-01 Thread Paul Moore
On Mon, Oct 23, 2023 at 11:52 PM Paul Moore wrote: > On Oct 4, 2023 Fan Wu wrote: > > > > The device-mapper has a flag to mark targets as singleton, which is a > > required flag for immutable targets. Without this flag, multiple > > dm-verity targets can be added to

Re: [PATCH RFC v11 12/19] dm: add finalize hook to target_type

2023-11-01 Thread Paul Moore
On Mon, Oct 23, 2023 at 11:52 PM Paul Moore wrote: > On Oct 4, 2023 Fan Wu wrote: > > > > This patch adds a target finalize hook. > > > > The hook is triggered just before activating an inactive table of a > > mapped device. If it returns an error the __bind get

Re: [PATCH RFC v11 13/19] dm verity: consume root hash digest and signature data via LSM hook

2023-11-01 Thread Paul Moore
On Mon, Oct 23, 2023 at 11:52 PM Paul Moore wrote: > > On Oct 4, 2023 Fan Wu wrote: > > > > dm-verity provides a strong guarantee of a block device's integrity. As > > a generic way to check the integrity of a block device, it provides > > those integr

Re: [PATCH RFC v11 15/19] fsverity: consume builtin signature via LSM hook

2023-11-02 Thread Paul Moore
On Wed, Nov 1, 2023 at 10:54 PM Eric Biggers wrote: > On Wed, Nov 01, 2023 at 08:40:06PM -0400, Paul Moore wrote: > > On Mon, Oct 23, 2023 at 11:52 PM Paul Moore wrote: > > > On Oct 4, 2023 Fan Wu wrote: > > > > > > > > fsverity represents

Re: [PATCH RFC v11 5/19] ipe: introduce 'boot_verified' as a trust provider

2023-11-03 Thread Paul Moore
On Thu, Nov 2, 2023 at 6:46 PM Fan Wu wrote: > On 10/26/2023 3:12 PM, Paul Moore wrote: > > On Thu, Oct 26, 2023 at 5:33 PM Fan Wu wrote: > >> On 10/23/2023 8:52 PM, Paul Moore wrote: > >>> On Oct 4, 2023 Fan Wu wrote: > >>>> > >>>&

Re: [PATCH RFC v11 5/19] ipe: introduce 'boot_verified' as a trust provider

2023-11-03 Thread Paul Moore
On Fri, Nov 3, 2023 at 6:15 PM Paul Moore wrote: > On Thu, Nov 2, 2023 at 6:46 PM Fan Wu wrote: > > On 10/26/2023 3:12 PM, Paul Moore wrote: > > > On Thu, Oct 26, 2023 at 5:33 PM Fan Wu wrote: > > >> On 10/23/2023 8:52 PM, Paul Moore wrote: > &g

Re: [PATCH v2] audit: Send netlink ACK before setting connection in auditd_set

2023-11-07 Thread Paul Moore
On Oct 18, 2023 Paul Moore wrote: > > When auditd_set sets the auditd_conn pointer, audit messages can > immediately be put on the socket by other kernel threads. If the backlog > is large or the rate is high, this can immediately fill the socket > buffer. If the audit daemon r

Re: [PATCH v2] audit: Send netlink ACK before setting connection in auditd_set

2023-11-12 Thread Paul Moore
On Tue, Nov 7, 2023 at 6:31 PM Paul Moore wrote: > On Oct 18, 2023 Paul Moore wrote: > > > > When auditd_set sets the auditd_conn pointer, audit messages can > > immediately be put on the socket by other kernel threads. If the backlog > > is large or the rate is high

Re: [PATCH v2] audit: don't take task_lock() in audit_exe_compare() code path

2023-11-14 Thread Paul Moore
On Tue, Nov 14, 2023 at 5:33 AM Mateusz Guzik wrote: > On 11/14/23, Artem Savkov wrote: > > On Tue, Oct 24, 2023 at 07:59:18PM +0200, Mateusz Guzik wrote: > >> For the thread to start executing ->mm has to be set. > >> > >> Although I do find it plausible there maybe a corner case during > >> ker

[PATCH] audit: don't WARN_ON_ONCE(!current->mm) in audit_exe_compare()

2023-11-14 Thread Paul Moore
results in some scary console messages so let's drop that and just do the regular `!current->mm` check to avoid problems. Cc: Fixes: 47846d51348d ("audit: don't take task_lock() in audit_exe_compare() code path") Reported-by: Artem Savkov Signed-off-by: Paul Moore --- k

Re: [PATCH v2] audit: don't take task_lock() in audit_exe_compare() code path

2023-11-14 Thread Paul Moore
On Tue, Nov 14, 2023 at 5:32 PM Mateusz Guzik wrote: > On 11/14/23, Paul Moore wrote: > > On Tue, Nov 14, 2023 at 5:33 AM Mateusz Guzik wrote: > >> On 11/14/23, Artem Savkov wrote: > >> > On Tue, Oct 24, 2023 at 07:59:18PM +0200, Mateusz Guzik wrote:

[PATCH] MAINTAINERS: update the audit entry

2023-11-15 Thread Paul Moore
rendering the Markdown. * Update the source tree's git URI to use https. * Aside from changes to the audit code itself, we also would like to be notified when the audit call sites are changed so we are adding an audit_XXX(...) regex to try and catch all of the callers. Signed-off

Re: [PATCH] MAINTAINERS: update the audit entry

2023-11-15 Thread Paul Moore
On Wed, Nov 15, 2023 at 12:25 PM Paul Moore wrote: > > Bring the audit subsystem entry up to date with the following changes: > > * Add our patchwork link. I'm not sure this is of much use for > anyone but the maintainer, but there is a provision for including it > h

[GIT PULL] audit/audit-pr-20231116

2023-11-16 Thread Paul Moore
t->mm) in audit_exe_compare() (2023-11-14 17:34:27 -0500) audit/stable-6.7 PR 20231116 ---- Paul Moore (1): audit: don't WARN_ON_ONCE(!current->mm) in a

Re: [PATCH 3/16] capability: rename cpu_vfs_cap_data to vfs_caps

2023-12-05 Thread Paul Moore
as he's the capabilities maintainer, but with my LSM hat on this looks okay, and is pretty trivial anyway. Acked-by: Paul Moore (Audit,LSM) -- paul-moore.com

Re: [PATCH 14/16] commoncap: remove cap_inode_getsecurity()

2023-12-05 Thread Paul Moore
> 2 files changed, 1 insertion(+), 136 deletions(-) Once again, you should get Serge's ACK on the commoncap.c stuff, but no objections from a LSM perspective. Acked-by: Paul Moore (LSM) -- paul-moore.com

Re: [PATCH 4/16] capability: use vfsuid_t for vfs_caps rootids

2023-12-05 Thread Paul Moore
as to indicate that they require a vfsuid_t parameter. At least the call to __vfsuid_val() should flag a type mismatch if some other type is used. Regardless, that is more of a general VFS issue and not a problem specific to this patchset. With the same understanding about the capabilities code

Re: [PATCH 2/2] audit: Apply codegen optimizations

2023-12-13 Thread Paul Moore
On Tue, Dec 12, 2023 at 5:29 AM Håkon Bugge wrote: > > For the most time-consuming function, when running a syscall benchmark > with STIG compliant audit rules: > > Overhead Command Shared Object Symbol > . . > > 2

Re: [PATCH 1/2] audit: Vary struct audit_entry alignment

2023-12-13 Thread Paul Moore
On Tue, Dec 12, 2023 at 5:29 AM Håkon Bugge wrote: > > We allocate struct audit_entry using kzalloc() which aligns the > structure at its natural boundary and so uses the kmalloc-512 > SLAB. > > That means that the lower order 9 bits are equal for these allocations. > Which on architectures with l

Re: [PATCH 1/2] audit: Vary struct audit_entry alignment

2023-12-18 Thread Paul Moore
On Sat, Dec 16, 2023 at 11:25 AM Haakon Bugge wrote: > > On 14 Dec 2023, at 00:54, Paul Moore wrote: > > > > Two things: > > > > 1. If we are going to create a kmem_cache pool we shouldn't create it > > here, it should be in its own audit_filter

Re: [PATCH 2/2] audit: Apply codegen optimizations

2023-12-18 Thread Paul Moore
On Sat, Dec 16, 2023 at 11:28 AM Haakon Bugge wrote: > > On 14 Dec 2023, at 00:45, Paul Moore wrote: > > On Tue, Dec 12, 2023 at 5:29 AM Håkon Bugge wrote: > >> > >> For the most time-consuming function, when running a syscall benchmark > >> with STIG com

Re: [PATCH bpf-next v3] bpf: Include pid, uid and comm in audit output

2023-12-19 Thread Paul Moore
On Fri, Dec 15, 2023 at 1:00 PM Alexei Starovoitov wrote: > On Fri, Dec 15, 2023 at 9:47 AM Dave Tucker wrote: > > > > Current output from auditd is as follows: > > > > time->Wed Dec 13 21:39:24 2023 > > type=BPF msg=audit(1702503564.519:11241): prog-id=439 op=LOAD > > > > This only tells you tha

Re: [PATCH 1/2] audit: Vary struct audit_entry alignment

2023-12-19 Thread Paul Moore
On Tue, Dec 19, 2023 at 4:07 PM Ankur Arora wrote: > Paul Moore writes: > > On Sat, Dec 16, 2023 at 11:25 AM Haakon Bugge > > wrote: > >> > On 14 Dec 2023, at 00:54, Paul Moore wrote: > >> > > >> > Two things: > >> > > >>

Re: [RFC PATCH v1 1/7] lsm: Add audit_log_lsm_data() helper

2023-12-20 Thread Paul Moore
On Thu, Sep 21, 2023 at 2:16 AM Mickaël Salaün wrote: > > Extract code from common_dump_audit_data() into the audit_log_lsm_data() Did you mean dump_common_audit_data()? Assuming you correct the function name above this looks fine to me. Acked-by: Paul Moore > helper. This helps reu

Re: [RFC PATCH v1 3/7] landlock: Log ruleset creation and release

2023-12-20 Thread Paul Moore
On Thu, Sep 21, 2023 at 2:17 AM Mickaël Salaün wrote: > > Add audit support for ruleset/domain creation and release. Ruleset and > domain IDs are generated from the same 64-bit counter to avoid confusing > them. There is no need to hide the sequentiality to users that are > already allowed to read

Re: [RFC PATCH v1 4/7] landlock: Log domain creation and enforcement

2023-12-20 Thread Paul Moore
On Thu, Sep 21, 2023 at 2:17 AM Mickaël Salaün wrote: > > Add audit support for domain creation, i.e. task self-restriction. > > Signed-off-by: Mickaël Salaün > --- > security/landlock/audit.c| 24 > security/landlock/audit.h| 8 > security/landlock/sys

Re: [RFC PATCH v1 5/7] landlock: Log file-related requests

2023-12-20 Thread Paul Moore
On Thu, Sep 21, 2023 at 2:17 AM Mickaël Salaün wrote: > > Add audit support for mkdir, mknod, symlink, unlink, rmdir, truncate, > and open requests. > > Signed-off-by: Mickaël Salaün > --- > security/landlock/audit.c | 114 ++ > security/landlock/audit.h | 32

Re: [PATCH 2/2] audit: Apply codegen optimizations

2023-12-21 Thread Paul Moore
On Thu, Dec 21, 2023 at 2:05 PM Haakon Bugge wrote: > > On 18 Dec 2023, at 23:09, Paul Moore wrote: > > On Sat, Dec 16, 2023 at 11:28 AM Haakon Bugge > > wrote: > >>> On 14 Dec 2023, at 00:45, Paul Moore wrote: > >>> On Tue, Dec 12, 2023 at 5:29 AM Hå

Re: [RFC PATCH v1 3/7] landlock: Log ruleset creation and release

2023-12-22 Thread Paul Moore
On Thu, Dec 21, 2023 at 1:45 PM Mickaël Salaün wrote: > On Wed, Dec 20, 2023 at 04:22:15PM -0500, Paul Moore wrote: > > On Thu, Sep 21, 2023 at 2:17 AM Mickaël Salaün wrote: > > > > > > Add audit support for ruleset/domain creation and release ...

Re: [PATCH] kernel: auditfilter: Remove unnecessary ‘0’ values from ret

2024-01-04 Thread Paul Moore
On Wed, Dec 27, 2023 at 9:56 PM Li zeming wrote: > > The ret variable is assigned when it does not need to be defined, as it > has already been assigned before use. > > Signed-off-by: Li zeming > --- > kernel/auditfilter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks for the p

Re: [RFC PATCH v1 3/7] landlock: Log ruleset creation and release

2024-01-05 Thread Paul Moore
On Fri, Dec 29, 2023 at 12:42 PM Mickaël Salaün wrote: > On Fri, Dec 22, 2023 at 05:42:35PM -0500, Paul Moore wrote: > > On Thu, Dec 21, 2023 at 1:45 PM Mickaël Salaün wrote: > > > On Wed, Dec 20, 2023 at 04:22:15PM -0500, Paul Moore wrote: > > > > On Thu, Sep 21,

[GIT PULL] audit/audit-pr-20240105

2024-01-05 Thread Paul Moore
R 20240105 Chris Riches (1): audit: Send netlink ACK before setting connection in auditd_set Paul Moore (1): MAINTAINERS: update the audit entry MAINTAINERS| 6 +- kernel/audit.c | 31 --- 2 files changed, 29 insert

IORING_OP_FIXED_FD_INSTALL and audit/LSM interactions

2024-01-19 Thread Paul Moore
Hello all, I just noticed the recent addition of IORING_OP_FIXED_FD_INSTALL and I see that it is currently written to skip the io_uring auditing. Assuming I'm understanding the patch correctly, and I'll admit that I've only looked at it for a short time today, my gut feeling is that we want to aud

Re: IORING_OP_FIXED_FD_INSTALL and audit/LSM interactions

2024-01-19 Thread Paul Moore
On Fri, Jan 19, 2024 at 12:02 PM Jens Axboe wrote: > > On 1/19/24 9:33 AM, Paul Moore wrote: > > Hello all, > > > > I just noticed the recent addition of IORING_OP_FIXED_FD_INSTALL and I > > see that it is currently written to skip the io_uring auditing. > >

Re: IORING_OP_FIXED_FD_INSTALL and audit/LSM interactions

2024-01-19 Thread Paul Moore
On Fri, Jan 19, 2024 at 12:41 PM Jens Axboe wrote: > On 1/19/24 10:20 AM, Paul Moore wrote: > > On Fri, Jan 19, 2024 at 12:02?PM Jens Axboe wrote: > >> On 1/19/24 9:33 AM, Paul Moore wrote: > >>> Hello all, > >>> > >>> I just noticed t

[PATCH] io_uring: enable audit and restrict cred override for IORING_OP_FIXED_FD_INSTALL

2024-01-23 Thread Paul Moore
CREDS on IORING_OP_FIXED_FD_INSTALL operations. Fixes: dc18b89ab113 ("io_uring/openclose: add support for IORING_OP_FIXED_FD_INSTALL") Signed-off-by: Paul Moore --- io_uring/opdef.c | 1 - io_uring/openclose.c | 4 2 files changed, 4 insertions(+), 1 deletion(-) diff --gi

Re: [PATCH] io_uring: enable audit and restrict cred override for IORING_OP_FIXED_FD_INSTALL

2024-01-23 Thread Paul Moore
On Tue, Jan 23, 2024 at 4:55 PM Paul Moore wrote: > > We need to correct some aspects of the IORING_OP_FIXED_FD_INSTALL > command to take into account the security implications of making an > io_uring-private file descriptor generally accessible to a userspace > task. > > The

Re: [PATCH] io_uring: enable audit and restrict cred override for IORING_OP_FIXED_FD_INSTALL

2024-01-23 Thread Paul Moore
On Tue, Jan 23, 2024 at 5:43 PM Jens Axboe wrote: > On 1/23/24 3:40 PM, Jens Axboe wrote: > > On 1/23/24 3:35 PM, Jens Axboe wrote: > >> > >> On Tue, 23 Jan 2024 16:55:02 -0500, Paul Moore wrote: > >>> We need to correct some aspects of the IORING_OP_FIXE

Re: [PATCH] kernel: auditfilter: Remove unnecessary ‘0’ values from ret

2024-01-25 Thread Paul Moore
On Dec 27, 2023 Li zeming wrote: > > The ret variable is assigned when it does not need to be defined, as it > has already been assigned before use. > > Signed-off-by: Li zeming > --- > kernel/auditfilter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Merged into audit/dev, thanks.

Re: [PATCH] audit: Use KMEM_CACHE instead of kmem_cache_create

2024-01-25 Thread Paul Moore
On Jan 24, 2024 Kunwu Chan wrote: > > Use the new KMEM_CACHE() macro instead of direct kmem_cache_create > to simplify the creation of SLAB caches. > > Signed-off-by: Kunwu Chan > --- > kernel/audit.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Merged into audit/dev, thanks. -

Re: [PATCH RFC v12 5/20] initramfs|security: Add security hook to initramfs unpack

2024-02-03 Thread Paul Moore
On Jan 30, 2024 Fan Wu wrote: > > This patch introduces a new hook to notify security system that the > content of initramfs has been unpacked into the rootfs. > > Upon receiving this notification, the security system can activate > a policy to allow only files that originated from the initramfs

Re: [PATCH RFC v12 6/20] ipe: introduce 'boot_verified' as a trust provider

2024-02-03 Thread Paul Moore
On Jan 30, 2024 Fan Wu wrote: > > IPE is designed to provide system level trust guarantees, this usually > implies that trust starts from bootup with a hardware root of trust, > which validates the bootloader. After this, the bootloader verifies > the kernel and the initramfs. > > As there's no

Re: [PATCH RFC v12 8/20] ipe: add userspace interface

2024-02-03 Thread Paul Moore
On Jan 30, 2024 Fan Wu wrote: > > As is typical with LSMs, IPE uses securityfs as its interface with > userspace. for a complete list of the interfaces and the respective > inputs/outputs, please see the documentation under > admin-guide/LSM/ipe.rst > > Signed-off-by: Deven Bowers > Signed-off-

Re: [PATCH RFC v12 9/20] uapi|audit|ipe: add ipe auditing support

2024-02-03 Thread Paul Moore
On Jan 30, 2024 Fan Wu wrote: > > Users of IPE require a way to identify when and why an operation fails, > allowing them to both respond to violations of policy and be notified > of potentially malicious actions on their systems with respect to IPE > itself. > > This patch introduces 3 new audi

Re: [PATCH RFC v12 10/20] ipe: add permissive toggle

2024-02-03 Thread Paul Moore
On Jan 30, 2024 Fan Wu wrote: > > IPE, like SELinux, supports a permissive mode. This mode allows policy > authors to test and evaluate IPE policy without it effecting their > programs. When the mode is changed, a 1404 AUDIT_MAC_STATUS > be reported. > > This patch adds the following audit recor

Re: [PATCH RFC v12 15/20] ipe: add support for dm-verity as a trust provider

2024-02-03 Thread Paul Moore
On Jan 30, 2024 Fan Wu wrote: > > Allows author of IPE policy to indicate trust for a singular dm-verity > volume, identified by roothash, through "dmverity_roothash" and all > signed dm-verity volumes, through "dmverity_signature". > > Signed-off-by: Deven Bowers > Signed-off-by: Fan Wu > ---

Re: [PATCH RFC v12 17/20] ipe: enable support for fs-verity as a trust provider

2024-02-03 Thread Paul Moore
On Jan 30, 2024 Fan Wu wrote: > > Enable IPE policy authors to indicate trust for a singular fsverity > file, identified by the digest information, through "fsverity_digest" > and all files using fsverity's builtin signatures via > "fsverity_signature". > > This enables file-level integrity clai

Re: [PATCH RFC v12 8/20] ipe: add userspace interface

2024-02-05 Thread Paul Moore
On Mon, Feb 5, 2024 at 6:01 PM Fan Wu wrote: > On 2/3/2024 2:25 PM, Paul Moore wrote: > > On Jan 30, 2024 Fan Wu wrote: > >> > >> As is typical with LSMs, IPE uses securityfs as its interface with > >> userspace. for a complete list of the interfaces an

Re: [PATCH RFC v12 15/20] ipe: add support for dm-verity as a trust provider

2024-02-06 Thread Paul Moore
On Mon, Feb 5, 2024 at 6:11 PM Fan Wu wrote: > On 2/3/2024 2:25 PM, Paul Moore wrote: > > On Jan 30, 2024 Fan Wu wrote: > >> > >> Allows author of IPE policy to indicate trust for a singular dm-verity > >> volume, identified by roothash, through "dmverit

Re: [PATCH v2 11/25] security: add hooks for set/get/remove of fscaps

2024-02-21 Thread Paul Moore
ecurity/security.c | 69 > +++ > 3 files changed, 109 insertions(+) One minor problem below, but assuming you fix that, this looks okay to me. Acked-by: Paul Moore > diff --git a/security/security.c b/security/security.c > index 3aaad75c9ce8..0d210da9862c 100644 > --- a

Re: [PATCH v2 12/25] selinux: add hooks for fscaps operations

2024-02-21 Thread Paul Moore
On Wed, Feb 21, 2024 at 4:25 PM Seth Forshee (DigitalOcean) wrote: > > Add hooks for set/get/remove fscaps operations which perform the same > checks as the xattr hooks would have done for XATTR_NAME_CAPS. > > Signed-off-by: Seth Forshee (DigitalOcean) > --- > security/selinux/hooks.c | 26 +

Re: [PATCH v2 15/25] security: call evm fscaps hooks from generic security hooks

2024-02-21 Thread Paul Moore
On Wed, Feb 21, 2024 at 4:25 PM Seth Forshee (DigitalOcean) wrote: > > Signed-off-by: Seth Forshee (DigitalOcean) > --- > security/security.c | 15 +-- > 1 file changed, 13 insertions(+), 2 deletions(-) First off, you've got to write *something* for the commit description, even if i

Re: [PATCH v2 12/25] selinux: add hooks for fscaps operations

2024-02-21 Thread Paul Moore
On Wed, Feb 21, 2024 at 7:10 PM Seth Forshee (DigitalOcean) wrote: > On Wed, Feb 21, 2024 at 06:38:33PM -0500, Paul Moore wrote: > > On Wed, Feb 21, 2024 at 4:25 PM Seth Forshee (DigitalOcean) > > wrote: > > > > > > Add hooks for set/get/remove fscaps

  1   2   3   >