[RFC PATCH ghak32 V2 13/13] debug audit: read container ID of a process

2018-03-16 Thread Richard Guy Briggs
Guy Briggs --- fs/proc/base.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 6ce4fbe..f66d1e2 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1300,6 +1300,21 @@ static ssize_t proc_sessionid_read(struct file

[RFC PATCH ghak32 V2 08/13] audit: add containerid support for tty_audit

2018-03-16 Thread Richard Guy Briggs
Add container ID auxiliary record to tty logging rule event standalone records. Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- drivers/tty/tty_audit.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c index e

[RFC PATCH ghak32 V2 08/13] audit: add containerid support for tty_audit

2018-03-16 Thread Richard Guy Briggs
Add container ID auxiliary record to tty logging rule event standalone records. Signed-off-by: Richard Guy Briggs --- drivers/tty/tty_audit.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c index e30aa6b..48ee4b7 100644

[RFC PATCH ghak32 V2 11/13] audit: add support for containerid to network namespaces

2018-03-16 Thread Richard Guy Briggs
See: https://github.com/linux-audit/audit-kernel/issues/32 See: https://github.com/linux-audit/audit-testsuite/issues/64 Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- include/linux/audit.h | 7 +++ include/net/net_namespace.h | 12 kernel/auditsc.c

[RFC PATCH ghak32 V2 11/13] audit: add support for containerid to network namespaces

2018-03-16 Thread Richard Guy Briggs
See: https://github.com/linux-audit/audit-kernel/issues/32 See: https://github.com/linux-audit/audit-testsuite/issues/64 Signed-off-by: Richard Guy Briggs --- include/linux/audit.h | 7 +++ include/net/net_namespace.h | 12 kernel/auditsc.c| 9 ++--- kernel

[RFC PATCH ghak32 V2 00/13] audit: implement container id

2018-03-16 Thread Richard Guy Briggs
bj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key="tmpcontainerid" See: https://github.com/linux-audit/audit-kernel/issues/32 https://github.com/linux-audit/audit-userspace/issues/40 https://github.com/linux-audit/audit-testsuite/issues/64 Richard G

[RFC PATCH ghak32 V2 00/13] audit: implement container id

2018-03-16 Thread Richard Guy Briggs
bj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key="tmpcontainerid" See: https://github.com/linux-audit/audit-kernel/issues/32 https://github.com/linux-audit/audit-userspace/issues/40 https://github.com/linux-audit/audit-testsuite/issues/64 Richard G

[RFC PATCH ghak32 V2 01/13] audit: add container id

2018-03-16 Thread Richard Guy Briggs
://github.com/linux-audit/audit-kernel/issues/32 Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- fs/proc/base.c | 37 include/linux/audit.h | 16 + include/linux/init_task.h | 4 ++- include/linux/sched.h | 1 + i

[RFC PATCH ghak32 V2 01/13] audit: add container id

2018-03-16 Thread Richard Guy Briggs
://github.com/linux-audit/audit-kernel/issues/32 Signed-off-by: Richard Guy Briggs --- fs/proc/base.c | 37 include/linux/audit.h | 16 + include/linux/init_task.h | 4 ++- include/linux/sched.h | 1 + include

[RFC PATCH ghak32 V2 03/13] audit: log container info of syscalls

2018-03-16 Thread Richard Guy Briggs
r=0 type=PROCTITLE msg=audit(1519924845.499:257): proctitle=62617368002D6300736C65657020313B206563686F2074657374203E202F746D702F746D70636F6E7461696E65726964 type=CONTAINER_INFO msg=audit(1519924845.499:257): op=task contid=123458 See: https://github.com/linux-audit/audit-kernel/issues/32 Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- incl

[RFC PATCH ghak32 V2 03/13] audit: log container info of syscalls

2018-03-16 Thread Richard Guy Briggs
r=0 type=PROCTITLE msg=audit(1519924845.499:257): proctitle=62617368002D6300736C65657020313B206563686F2074657374203E202F746D702F746D70636F6E7461696E65726964 type=CONTAINER_INFO msg=audit(1519924845.499:257): op=task contid=123458 See: https://github.com/linux-audit/audit-kernel/issues/32 Signed-off-by: Richard Guy Briggs --- include/linux/audit.

[RFC PATCH ghak32 V2 04/13] audit: add containerid filtering

2018-03-16 Thread Richard Guy Briggs
is AUDIT_FEATURE_BITMAP_CONTAINERID_FILTER. This requires support from userspace to be useful. See: https://github.com/linux-audit/audit-userspace/issues/40 Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- include/linux/audit.h | 1 + include/uapi/linux/audit.h | 5 - kernel/audit.h

[RFC PATCH ghak32 V2 04/13] audit: add containerid filtering

2018-03-16 Thread Richard Guy Briggs
is AUDIT_FEATURE_BITMAP_CONTAINERID_FILTER. This requires support from userspace to be useful. See: https://github.com/linux-audit/audit-userspace/issues/40 Signed-off-by: Richard Guy Briggs --- include/linux/audit.h | 1 + include/uapi/linux/audit.h | 5 - kernel/audit.h | 1 + kernel

Re: [RFC PATCH V1 01/12] audit: add container id

2018-03-15 Thread Richard Guy Briggs
On 2018-03-15 16:27, Stefan Berger wrote: > On 03/01/2018 02:41 PM, Richard Guy Briggs wrote: > > Implement the proc fs write to set the audit container ID of a process, > > emitting an AUDIT_CONTAINER record to document the event. > > > > This is a write from the

Re: [RFC PATCH V1 01/12] audit: add container id

2018-03-15 Thread Richard Guy Briggs
On 2018-03-15 16:27, Stefan Berger wrote: > On 03/01/2018 02:41 PM, Richard Guy Briggs wrote: > > Implement the proc fs write to set the audit container ID of a process, > > emitting an AUDIT_CONTAINER record to document the event. > > > > This is a write from the

[PATCH ghak21 V3 1/2] audit: remove path param from link denied function

2018-03-13 Thread Richard Guy Briggs
In commit 45b578fe4c3cade6f4ca1fc934ce199afd857edc ("audit: link denied should not directly generate PATH record") the need for the struct path *link parameter was removed. Remove the now useless struct path argument. Signed-off-by: Richard Guy Briggs <r...@redhat.com>

[PATCH ghak21 V3 0/2] audit: address ANOM_LINK excess records

2018-03-13 Thread Richard Guy Briggs
erfluous struct path * parameter from audit_log_link_denied() - refactor audit_log_symlink_denied() to properly free memory (pathname, filename) Richard Guy Briggs (2): audit: remove path param from link denied function audit: add refused symlink to audit_names fs/namei.c| 3 ++- i

[PATCH ghak21 V3 1/2] audit: remove path param from link denied function

2018-03-13 Thread Richard Guy Briggs
In commit 45b578fe4c3cade6f4ca1fc934ce199afd857edc ("audit: link denied should not directly generate PATH record") the need for the struct path *link parameter was removed. Remove the now useless struct path argument. Signed-off-by: Richard Guy Briggs --- fs/namei.c| 2 +

[PATCH ghak21 V3 0/2] audit: address ANOM_LINK excess records

2018-03-13 Thread Richard Guy Briggs
erfluous struct path * parameter from audit_log_link_denied() - refactor audit_log_symlink_denied() to properly free memory (pathname, filename) Richard Guy Briggs (2): audit: remove path param from link denied function audit: add refused symlink to audit_names fs/namei.c| 3 ++- i

[PATCH ghak21 V3 2/2] audit: add refused symlink to audit_names

2018-03-13 Thread Richard Guy Briggs
Audit link denied events for symlinks had duplicate PATH records rather than just updating the existing PATH record. Update the symlink's PATH record with the current dentry and inode information. See: https://github.com/linux-audit/audit-kernel/issues/21 Signed-off-by: Richard Guy Briggs &l

[PATCH ghak21 V3 2/2] audit: add refused symlink to audit_names

2018-03-13 Thread Richard Guy Briggs
Audit link denied events for symlinks had duplicate PATH records rather than just updating the existing PATH record. Update the symlink's PATH record with the current dentry and inode information. See: https://github.com/linux-audit/audit-kernel/issues/21 Signed-off-by: Richard Guy Briggs

Re: [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-13 Thread Richard Guy Briggs
On 2018-03-13 16:24, Paul Moore wrote: > On Tue, Mar 13, 2018 at 6:52 AM, Richard Guy Briggs <r...@redhat.com> wrote: > > On 2018-03-13 11:38, Steve Grubb wrote: > >> On Tue, 13 Mar 2018 06:11:08 -0400 > >> Richard Guy Briggs <r...@redhat.com> wrote: >

Re: [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-13 Thread Richard Guy Briggs
On 2018-03-13 16:24, Paul Moore wrote: > On Tue, Mar 13, 2018 at 6:52 AM, Richard Guy Briggs wrote: > > On 2018-03-13 11:38, Steve Grubb wrote: > >> On Tue, 13 Mar 2018 06:11:08 -0400 > >> Richard Guy Briggs wrote: > >> > >> > On 2018-03-13 09:35,

Re: [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-13 Thread Richard Guy Briggs
On 2018-03-13 11:38, Steve Grubb wrote: > On Tue, 13 Mar 2018 06:11:08 -0400 > Richard Guy Briggs <r...@redhat.com> wrote: > > > On 2018-03-13 09:35, Steve Grubb wrote: > > > On Mon, 12 Mar 2018 11:52:56 -0400 > > > Richard Guy Briggs <r...@redhat.com>

Re: [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-13 Thread Richard Guy Briggs
On 2018-03-13 11:38, Steve Grubb wrote: > On Tue, 13 Mar 2018 06:11:08 -0400 > Richard Guy Briggs wrote: > > > On 2018-03-13 09:35, Steve Grubb wrote: > > > On Mon, 12 Mar 2018 11:52:56 -0400 > > > Richard Guy Briggs wrote: > > > >

Re: [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-13 Thread Richard Guy Briggs
On 2018-03-13 09:35, Steve Grubb wrote: > On Mon, 12 Mar 2018 11:52:56 -0400 > Richard Guy Briggs <r...@redhat.com> wrote: > > > On 2018-03-12 11:53, Paul Moore wrote: > > > On Mon, Mar 12, 2018 at 11:26 AM, Richard Guy Briggs > > > <r...@redhat.com&g

Re: [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-13 Thread Richard Guy Briggs
On 2018-03-13 09:35, Steve Grubb wrote: > On Mon, 12 Mar 2018 11:52:56 -0400 > Richard Guy Briggs wrote: > > > On 2018-03-12 11:53, Paul Moore wrote: > > > On Mon, Mar 12, 2018 at 11:26 AM, Richard Guy Briggs > > > wrote: > > > > On 2018-03-12 11

Re: [PATCH] audit: add containerid support for IMA-audit

2018-03-12 Thread Richard Guy Briggs
On 2018-03-08 13:02, Mimi Zohar wrote: > On Thu, 2018-03-08 at 06:21 -0500, Richard Guy Briggs wrote: > > On 2018-03-05 09:24, Mimi Zohar wrote: > > > On Mon, 2018-03-05 at 08:50 -0500, Richard Guy Briggs wrote: > > > > On 2018-03-05 08:43, Mimi Zoh

Re: [PATCH] audit: add containerid support for IMA-audit

2018-03-12 Thread Richard Guy Briggs
On 2018-03-08 13:02, Mimi Zohar wrote: > On Thu, 2018-03-08 at 06:21 -0500, Richard Guy Briggs wrote: > > On 2018-03-05 09:24, Mimi Zohar wrote: > > > On Mon, 2018-03-05 at 08:50 -0500, Richard Guy Briggs wrote: > > > > On 2018-03-05 08:43, Mimi Zoh

Re: [PATCH ghak21 V2 2/4] audit: link denied should not directly generate PATH record

2018-03-12 Thread Richard Guy Briggs
thub.com/0day-ci/linux/commits/Richard-Guy-Briggs/audit-address-ANOM_LINK-excess-records/20180313-015527 > Note: the > linux-review/Richard-Guy-Briggs/audit-address-ANOM_LINK-excess-records/20180313-015527 > HEAD 12e8c56bcd359f7d20d4ae011674d37bc832bc4c builds fine. > It only h

Re: [PATCH ghak21 V2 2/4] audit: link denied should not directly generate PATH record

2018-03-12 Thread Richard Guy Briggs
thub.com/0day-ci/linux/commits/Richard-Guy-Briggs/audit-address-ANOM_LINK-excess-records/20180313-015527 > Note: the > linux-review/Richard-Guy-Briggs/audit-address-ANOM_LINK-excess-records/20180313-015527 > HEAD 12e8c56bcd359f7d20d4ae011674d37bc832bc4c builds fine. > It only h

Re: [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-12 Thread Richard Guy Briggs
On 2018-03-12 11:53, Paul Moore wrote: > On Mon, Mar 12, 2018 at 11:26 AM, Richard Guy Briggs <r...@redhat.com> wrote: > > On 2018-03-12 11:12, Paul Moore wrote: > >> On Mon, Mar 12, 2018 at 2:31 AM, Richard Guy Briggs <r...@redhat.com> > >> wrote: > >

Re: [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-12 Thread Richard Guy Briggs
On 2018-03-12 11:53, Paul Moore wrote: > On Mon, Mar 12, 2018 at 11:26 AM, Richard Guy Briggs wrote: > > On 2018-03-12 11:12, Paul Moore wrote: > >> On Mon, Mar 12, 2018 at 2:31 AM, Richard Guy Briggs > >> wrote: > >> > Audit link denied events for sym

Re: [PATCH ghak21 V2 2/4] audit: link denied should not directly generate PATH record

2018-03-12 Thread Richard Guy Briggs
On 2018-03-12 11:05, Paul Moore wrote: > On Mon, Mar 12, 2018 at 2:31 AM, Richard Guy Briggs <r...@redhat.com> wrote: > > Audit link denied events generate duplicate PATH records which disagree > > in different ways from symlink and hardlink denials. > > audit_log_link_d

Re: [PATCH ghak21 V2 2/4] audit: link denied should not directly generate PATH record

2018-03-12 Thread Richard Guy Briggs
On 2018-03-12 11:05, Paul Moore wrote: > On Mon, Mar 12, 2018 at 2:31 AM, Richard Guy Briggs wrote: > > Audit link denied events generate duplicate PATH records which disagree > > in different ways from symlink and hardlink denials. > > audit_log_link_denied() should not d

Re: [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-12 Thread Richard Guy Briggs
On 2018-03-12 11:12, Paul Moore wrote: > On Mon, Mar 12, 2018 at 2:31 AM, Richard Guy Briggs <r...@redhat.com> wrote: > > Audit link denied events for symlinks had duplicate PATH records rather > > than just updating the existing PATH record. Update the symlink's PATH > &

Re: [PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-12 Thread Richard Guy Briggs
On 2018-03-12 11:12, Paul Moore wrote: > On Mon, Mar 12, 2018 at 2:31 AM, Richard Guy Briggs wrote: > > Audit link denied events for symlinks had duplicate PATH records rather > > than just updating the existing PATH record. Update the symlink's PATH > > record with the cur

Re: [PATCH ghak21 V2 0/4] audit: address ANOM_LINK excess records

2018-03-12 Thread Richard Guy Briggs
On 2018-03-12 02:31, Richard Guy Briggs wrote: > Audit link denied events were being unexpectedly produced in a disjoint > way when audit was disabled, and when they were expected, there were > duplicate PATH records. This patchset addresses both issues for > symlinks a

Re: [PATCH ghak21 V2 0/4] audit: address ANOM_LINK excess records

2018-03-12 Thread Richard Guy Briggs
On 2018-03-12 02:31, Richard Guy Briggs wrote: > Audit link denied events were being unexpectedly produced in a disjoint > way when audit was disabled, and when they were expected, there were > duplicate PATH records. This patchset addresses both issues for > symlinks a

Re: [RFC PATCH ghak21 2/4] audit: link denied should not directly generate PATH record

2018-03-12 Thread Richard Guy Briggs
On 2018-03-08 19:26, Paul Moore wrote: > On Wed, Feb 14, 2018 at 11:18 AM, Richard Guy Briggs <r...@redhat.com> wrote: > > Audit link denied events generate duplicate PATH records which disagree > > in different ways from symlink and hardlink denials. > > aud

Re: [RFC PATCH ghak21 2/4] audit: link denied should not directly generate PATH record

2018-03-12 Thread Richard Guy Briggs
On 2018-03-08 19:26, Paul Moore wrote: > On Wed, Feb 14, 2018 at 11:18 AM, Richard Guy Briggs wrote: > > Audit link denied events generate duplicate PATH records which disagree > > in different ways from symlink and hardlink denials. > > audit_log_link_denied() should not d

Re: [RFC PATCH ghak21 4/4] audit: add parent of refused symlink to audit_names

2018-03-12 Thread Richard Guy Briggs
On 2018-03-08 19:50, Paul Moore wrote: > On Wed, Feb 14, 2018 at 11:18 AM, Richard Guy Briggs <r...@redhat.com> wrote: > > Audit link denied events for symlinks were missing the parent PATH > > record. Add it. Since the full pathname may not be available, > > r

Re: [RFC PATCH ghak21 4/4] audit: add parent of refused symlink to audit_names

2018-03-12 Thread Richard Guy Briggs
On 2018-03-08 19:50, Paul Moore wrote: > On Wed, Feb 14, 2018 at 11:18 AM, Richard Guy Briggs wrote: > > Audit link denied events for symlinks were missing the parent PATH > > record. Add it. Since the full pathname may not be available, > > reconstruct it from the

[PATCH ghak21 V2 1/4] audit: make ANOM_LINK obey audit_enabled and audit_dummy_context

2018-03-12 Thread Richard Guy Briggs
Audit link denied events emit disjointed records when audit is disabled. No records should be emitted when audit is disabled. See: https://github.com/linux-audit/audit-kernel/issues/21 Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- kernel/audit.c | 3 +++ 1 file changed, 3 inse

[PATCH ghak21 V2 0/4] audit: address ANOM_LINK excess records

2018-03-12 Thread Richard Guy Briggs
dit-kernel/issues/51 Richard Guy Briggs (4): audit: make ANOM_LINK obey audit_enabled and audit_dummy_context audit: link denied should not directly generate PATH record audit: add refused symlink to audit_names audit: add parent of refused symlink to audit_names fs/namei.c| 5

[PATCH ghak21 V2 1/4] audit: make ANOM_LINK obey audit_enabled and audit_dummy_context

2018-03-12 Thread Richard Guy Briggs
Audit link denied events emit disjointed records when audit is disabled. No records should be emitted when audit is disabled. See: https://github.com/linux-audit/audit-kernel/issues/21 Signed-off-by: Richard Guy Briggs --- kernel/audit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH ghak21 V2 0/4] audit: address ANOM_LINK excess records

2018-03-12 Thread Richard Guy Briggs
dit-kernel/issues/51 Richard Guy Briggs (4): audit: make ANOM_LINK obey audit_enabled and audit_dummy_context audit: link denied should not directly generate PATH record audit: add refused symlink to audit_names audit: add parent of refused symlink to audit_names fs/namei.c| 5

[PATCH ghak21 V2 2/4] audit: link denied should not directly generate PATH record

2018-03-12 Thread Richard Guy Briggs
-kernel/issues/21 Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- fs/namei.c| 2 +- include/linux/audit.h | 6 ++ kernel/audit.c| 17 ++--- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 9cc91fb..5

[PATCH ghak21 V2 2/4] audit: link denied should not directly generate PATH record

2018-03-12 Thread Richard Guy Briggs
-kernel/issues/21 Signed-off-by: Richard Guy Briggs --- fs/namei.c| 2 +- include/linux/audit.h | 6 ++ kernel/audit.c| 17 ++--- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 9cc91fb..50d2533 100644 --- a/fs

[PATCH ghak21 V2 4/4] audit: add parent of refused symlink to audit_names

2018-03-12 Thread Richard Guy Briggs
Audit link denied events for symlinks were missing the parent PATH record. Add it. Since the full pathname may not be available, reconstruct it from the path in the nameidata supplied. See: https://github.com/linux-audit/audit-kernel/issues/21 Signed-off-by: Richard Guy Briggs <r...@redhat.

[PATCH ghak21 V2 4/4] audit: add parent of refused symlink to audit_names

2018-03-12 Thread Richard Guy Briggs
Audit link denied events for symlinks were missing the parent PATH record. Add it. Since the full pathname may not be available, reconstruct it from the path in the nameidata supplied. See: https://github.com/linux-audit/audit-kernel/issues/21 Signed-off-by: Richard Guy Briggs --- fs/namei.c

[PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-12 Thread Richard Guy Briggs
Audit link denied events for symlinks had duplicate PATH records rather than just updating the existing PATH record. Update the symlink's PATH record with the current dentry and inode information. See: https://github.com/linux-audit/audit-kernel/issues/21 Signed-off-by: Richard Guy Briggs &l

[PATCH ghak21 V2 3/4] audit: add refused symlink to audit_names

2018-03-12 Thread Richard Guy Briggs
Audit link denied events for symlinks had duplicate PATH records rather than just updating the existing PATH record. Update the symlink's PATH record with the current dentry and inode information. See: https://github.com/linux-audit/audit-kernel/issues/21 Signed-off-by: Richard Guy Briggs

Re: [PATCH] audit: set TIF_AUDIT_SYSCALL only if audit filter has been populated

2018-03-08 Thread Richard Guy Briggs
On 2018-03-08 06:30, Andy Lutomirski wrote: > > > > On Mar 8, 2018, at 1:12 AM, Richard Guy Briggs <r...@redhat.com> wrote: > > > >> On 2018-03-07 18:43, Paul Moore wrote: > >>> On Wed, Mar 7, 2018 at 6:41 PM, Paul Moore <p...@paul-moore.com>

Re: [PATCH] audit: set TIF_AUDIT_SYSCALL only if audit filter has been populated

2018-03-08 Thread Richard Guy Briggs
On 2018-03-08 06:30, Andy Lutomirski wrote: > > > > On Mar 8, 2018, at 1:12 AM, Richard Guy Briggs wrote: > > > >> On 2018-03-07 18:43, Paul Moore wrote: > >>> On Wed, Mar 7, 2018 at 6:41 PM, Paul Moore wrote: > >>>> On Wed, Mar 7, 2018

Re: [RFC PATCH ghak21 0/4] audit: address ANOM_LINK excess records

2018-03-08 Thread Richard Guy Briggs
On 2018-02-14 22:46, Richard Guy Briggs wrote: > On 2018-02-14 11:49, Steve Grubb wrote: > > On Wednesday, February 14, 2018 11:18:20 AM EST Richard Guy Briggs wrote: > > > Audit link denied events were being unexpectedly produced in a disjoint > > > way when audit was d

Re: [RFC PATCH ghak21 0/4] audit: address ANOM_LINK excess records

2018-03-08 Thread Richard Guy Briggs
On 2018-02-14 22:46, Richard Guy Briggs wrote: > On 2018-02-14 11:49, Steve Grubb wrote: > > On Wednesday, February 14, 2018 11:18:20 AM EST Richard Guy Briggs wrote: > > > Audit link denied events were being unexpectedly produced in a disjoint > > > way when audit was d

Re: [PATCH] audit: add containerid support for IMA-audit

2018-03-08 Thread Richard Guy Briggs
On 2018-03-05 09:24, Mimi Zohar wrote: > On Mon, 2018-03-05 at 08:50 -0500, Richard Guy Briggs wrote: > > On 2018-03-05 08:43, Mimi Zohar wrote: > > > Hi Richard, > > > > > > This patch has been compiled, but not runtime tested. > > > > Ok, great,

Re: [PATCH] audit: add containerid support for IMA-audit

2018-03-08 Thread Richard Guy Briggs
On 2018-03-05 09:24, Mimi Zohar wrote: > On Mon, 2018-03-05 at 08:50 -0500, Richard Guy Briggs wrote: > > On 2018-03-05 08:43, Mimi Zohar wrote: > > > Hi Richard, > > > > > > This patch has been compiled, but not runtime tested. > > > > Ok, great,

Re: [PATCH] audit: set TIF_AUDIT_SYSCALL only if audit filter has been populated

2018-03-08 Thread Richard Guy Briggs
tick to speed up non-audited tasks when there are rules present, though this isn't currently used, in favour of audit_context presence. > > Andy, if you've got any Reviewed-by/Tested-by/NACK/etc. you want to > > add, that would be good to have. > > ... and I just realized that linux-audit isn't on the To/CC line, > adding them now. (and Andy's non-NACK missed too...) The mailing list *is* in MAINTAINERS. > Link to the patch is below. > > * https://marc.info/?t=15204188763=1=2 > > paul moore - RGB -- Richard Guy Briggs <r...@redhat.com> Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635

Re: [PATCH] audit: set TIF_AUDIT_SYSCALL only if audit filter has been populated

2018-03-08 Thread Richard Guy Briggs
e rules present, though this isn't currently used, in favour of audit_context presence. > > Andy, if you've got any Reviewed-by/Tested-by/NACK/etc. you want to > > add, that would be good to have. > > ... and I just realized that linux-audit isn't on the To/CC line, > adding them now. (and Andy's non-NACK missed too...) The mailing list *is* in MAINTAINERS. > Link to the patch is below. > > * https://marc.info/?t=15204188763=1=2 > > paul moore - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635

Re: [PATCH] audit: add containerid support for IMA-audit

2018-03-05 Thread Richard Guy Briggs
ontainerid_set(current)) > + audit_log_format(ab, " contid=%llu", > + audit_get_containerid(current)); > audit_log_end(ab); > > iint->flags |= IMA_AUDITED; > -- > 2.7.5 > - RGB -- Richard Guy Briggs <r...@redhat.com> Sr. S/W Engineer, Kernel Sec

Re: [PATCH] audit: add containerid support for IMA-audit

2018-03-05 Thread Richard Guy Briggs
contid=%llu", > + audit_get_containerid(current)); > audit_log_end(ab); > > iint->flags |= IMA_AUDITED; > -- > 2.7.5 > - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635

Re: [RFC PATCH V1 01/12] audit: add container id

2018-03-05 Thread Richard Guy Briggs
On 2018-03-04 10:01, Paul Moore wrote: > On Sat, Mar 3, 2018 at 4:19 AM, Serge E. Hallyn <se...@hallyn.com> wrote: > > On Thu, Mar 01, 2018 at 02:41:04PM -0500, Richard Guy Briggs wrote: > > ... > >> +static inline bool audit_containerid_set(struct task_s

Re: [RFC PATCH V1 01/12] audit: add container id

2018-03-05 Thread Richard Guy Briggs
On 2018-03-04 10:01, Paul Moore wrote: > On Sat, Mar 3, 2018 at 4:19 AM, Serge E. Hallyn wrote: > > On Thu, Mar 01, 2018 at 02:41:04PM -0500, Richard Guy Briggs wrote: > > ... > >> +static inline bool audit_containerid_set(struct task_struct *tsk) > > >

[RFC PATCH] auditctl: add support for containerid filter

2018-03-05 Thread Richard Guy Briggs
/linux-audit/audit-kernel/issues/32 See: https://github.com/linux-audit/audit-testsuite/issues/64 Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- Note: This is a userspace patch for the audit utils to support the kernel RFC patchset, in optimism of kernel support acceptance. ausearch woul

[RFC PATCH] auditctl: add support for containerid filter

2018-03-05 Thread Richard Guy Briggs
/linux-audit/audit-kernel/issues/32 See: https://github.com/linux-audit/audit-testsuite/issues/64 Signed-off-by: Richard Guy Briggs --- Note: This is a userspace patch for the audit utils to support the kernel RFC patchset, in optimism of kernel support acceptance. ausearch would also need support

Re: [RFC PATCH V1 00/12] audit: implement container id

2018-03-04 Thread Richard Guy Briggs
On 2018-03-04 16:55, Mimi Zohar wrote: > On Thu, 2018-03-01 at 14:41 -0500, Richard Guy Briggs wrote: > > Implement audit kernel container ID. > > > > This patchset is a preliminary RFC based on the proposal document (V3) > > posted: > > https://www.red

Re: [RFC PATCH V1 00/12] audit: implement container id

2018-03-04 Thread Richard Guy Briggs
On 2018-03-04 16:55, Mimi Zohar wrote: > On Thu, 2018-03-01 at 14:41 -0500, Richard Guy Briggs wrote: > > Implement audit kernel container ID. > > > > This patchset is a preliminary RFC based on the proposal document (V3) > > posted: > > https://www.red

Re: [RFC PATCH V1 01/12] audit: add container id

2018-03-01 Thread Richard Guy Briggs
On 2018-03-01 14:41, Richard Guy Briggs wrote: > Implement the proc fs write to set the audit container ID of a process, > emitting an AUDIT_CONTAINER record to document the event. > > This is a write from the container orchestrator task to a proc entry of > the form /proc/PID/co

Re: [RFC PATCH V1 01/12] audit: add container id

2018-03-01 Thread Richard Guy Briggs
On 2018-03-01 14:41, Richard Guy Briggs wrote: > Implement the proc fs write to set the audit container ID of a process, > emitting an AUDIT_CONTAINER record to document the event. > > This is a write from the container orchestrator task to a proc entry of > the form /proc/PID/co

[RFC PATCH V1 02/12] audit: log container info of syscalls

2018-03-01 Thread Richard Guy Briggs
r=0 type=PROCTITLE msg=audit(1519924845.499:257): proctitle=62617368002D6300736C65657020313B206563686F2074657374203E202F746D702F746D70636F6E7461696E65726964 type=UNKNOWN[1332] msg=audit(1519924845.499:257): op=task contid=123458 See: https://github.com/linux-audit/audit-kernel/issues/32 Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- incl

[RFC PATCH V1 02/12] audit: log container info of syscalls

2018-03-01 Thread Richard Guy Briggs
r=0 type=PROCTITLE msg=audit(1519924845.499:257): proctitle=62617368002D6300736C65657020313B206563686F2074657374203E202F746D702F746D70636F6E7461696E65726964 type=UNKNOWN[1332] msg=audit(1519924845.499:257): op=task contid=123458 See: https://github.com/linux-audit/audit-kernel/issues/32 Signed-off-by: Richard Guy Briggs --- include/linux/audit.h |

[RFC PATCH V1 04/12] audit: read container ID of a process

2018-03-01 Thread Richard Guy Briggs
Guy Briggs <r...@redhat.com> --- fs/proc/base.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 6ce4fbe..f66d1e2 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1300,6 +1300,21 @@ static ssize_t proc_sessioni

[RFC PATCH V1 04/12] audit: read container ID of a process

2018-03-01 Thread Richard Guy Briggs
Guy Briggs --- fs/proc/base.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 6ce4fbe..f66d1e2 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1300,6 +1300,21 @@ static ssize_t proc_sessionid_read(struct file

[RFC PATCH V1 03/12] audit: add containerid filtering

2018-03-01 Thread Richard Guy Briggs
is AUDIT_FEATURE_BITMAP_CONTAINERID_FILTER. This requires support from userspace to be useful. See: https://github.com/linux-audit/audit-userspace/issues/40 Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- include/linux/audit.h | 1 + include/uapi/linux/audit.h | 5 - kernel/audit.h

[RFC PATCH V1 03/12] audit: add containerid filtering

2018-03-01 Thread Richard Guy Briggs
is AUDIT_FEATURE_BITMAP_CONTAINERID_FILTER. This requires support from userspace to be useful. See: https://github.com/linux-audit/audit-userspace/issues/40 Signed-off-by: Richard Guy Briggs --- include/linux/audit.h | 1 + include/uapi/linux/audit.h | 5 - kernel/audit.h | 1 + kernel

[RFC PATCH V1 06/12] audit: add support for non-syscall auxiliary records

2018-03-01 Thread Richard Guy Briggs
immediately after the local associated records are produced. Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- include/linux/audit.h | 8 kernel/auditsc.c | 20 +++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/include/linux/audit.h b/i

[RFC PATCH V1 06/12] audit: add support for non-syscall auxiliary records

2018-03-01 Thread Richard Guy Briggs
immediately after the local associated records are produced. Signed-off-by: Richard Guy Briggs --- include/linux/audit.h | 8 kernel/auditsc.c | 20 +++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/include/linux/audit.h b/include/linux/audit.h

[RFC PATCH V1 09/12] audit: add containerid support for config/feature/user records

2018-03-01 Thread Richard Guy Briggs
Add container ID information to configuration change, feature set change and user generated standalone records. Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- kernel/audit.c | 50 -- kernel/auditfilter.c | 5 - 2 files c

[RFC PATCH V1 09/12] audit: add containerid support for config/feature/user records

2018-03-01 Thread Richard Guy Briggs
Add container ID information to configuration change, feature set change and user generated standalone records. Signed-off-by: Richard Guy Briggs --- kernel/audit.c | 50 -- kernel/auditfilter.c | 5 - 2 files changed, 44 insertions

[RFC PATCH V1 11/12] debug audit: add container id

2018-03-01 Thread Richard Guy Briggs
Switch from the 1000 range to the 1300 range for the prototype until it can be worked out why the former aren't showing up in the logs. --- include/uapi/linux/audit.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h

[RFC PATCH V1 11/12] debug audit: add container id

2018-03-01 Thread Richard Guy Briggs
Switch from the 1000 range to the 1300 range for the prototype until it can be worked out why the former aren't showing up in the logs. --- include/uapi/linux/audit.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h

[RFC PATCH V1 12/12] debug! audit: add container id

2018-03-01 Thread Richard Guy Briggs
Debugging code for verbose output to aid in development. --- fs/proc/base.c | 10 ++ kernel/auditsc.c | 16 2 files changed, 26 insertions(+) diff --git a/fs/proc/base.c b/fs/proc/base.c index f66d1e2..63d1ca4 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1309,9

[RFC PATCH V1 12/12] debug! audit: add container id

2018-03-01 Thread Richard Guy Briggs
Debugging code for verbose output to aid in development. --- fs/proc/base.c | 10 ++ kernel/auditsc.c | 16 2 files changed, 26 insertions(+) diff --git a/fs/proc/base.c b/fs/proc/base.c index f66d1e2..63d1ca4 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1309,9

[RFC PATCH V1 10/12] audit: add containerid support for seccomp and anom_abend records

2018-03-01 Thread Richard Guy Briggs
Add container ID information to secure computing and abnormal end standalone records. Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- kernel/auditsc.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 0cbd762..f

[RFC PATCH V1 10/12] audit: add containerid support for seccomp and anom_abend records

2018-03-01 Thread Richard Guy Briggs
Add container ID information to secure computing and abnormal end standalone records. Signed-off-by: Richard Guy Briggs --- kernel/auditsc.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 0cbd762..fcee34e 100644

[RFC PATCH V1 08/12] audit: add containerid support for tty_audit

2018-03-01 Thread Richard Guy Briggs
Add container ID information to tty logging rule standalone records. Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- drivers/tty/tty_audit.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c index e30aa6b..4

[RFC PATCH V1 08/12] audit: add containerid support for tty_audit

2018-03-01 Thread Richard Guy Briggs
Add container ID information to tty logging rule standalone records. Signed-off-by: Richard Guy Briggs --- drivers/tty/tty_audit.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c index e30aa6b..48ee4b7 100644

[RFC PATCH V1 07/12] audit: add container aux record to watch/tree/mark

2018-03-01 Thread Richard Guy Briggs
Add container ID information to mark, watch and tree rule standalone records. Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- kernel/audit_fsnotify.c | 5 - kernel/audit_tree.c | 5 - kernel/audit_watch.c| 33 +++-- 3 files chang

[RFC PATCH V1 07/12] audit: add container aux record to watch/tree/mark

2018-03-01 Thread Richard Guy Briggs
Add container ID information to mark, watch and tree rule standalone records. Signed-off-by: Richard Guy Briggs --- kernel/audit_fsnotify.c | 5 - kernel/audit_tree.c | 5 - kernel/audit_watch.c| 33 +++-- 3 files changed, 27 insertions(+), 16

[RFC PATCH V1 05/12] audit: add containerid support for ptrace and signals

2018-03-01 Thread Richard Guy Briggs
Add container ID support to ptrace and signals. In particular, the "op" field provides a way to label the auxiliary record to which it is associated. Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- include/linux/audit.h | 16 +++- kernel/aud

[RFC PATCH V1 01/12] audit: add container id

2018-03-01 Thread Richard Guy Briggs
://github.com/linux-audit/audit-kernel/issues/32 Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- fs/proc/base.c | 37 include/linux/audit.h | 16 + include/linux/init_task.h | 4 ++- include/linux/sched.h | 1 + i

[RFC PATCH V1 05/12] audit: add containerid support for ptrace and signals

2018-03-01 Thread Richard Guy Briggs
Add container ID support to ptrace and signals. In particular, the "op" field provides a way to label the auxiliary record to which it is associated. Signed-off-by: Richard Guy Briggs --- include/linux/audit.h | 16 +++- kernel/audit.c| 12 kern

[RFC PATCH V1 01/12] audit: add container id

2018-03-01 Thread Richard Guy Briggs
://github.com/linux-audit/audit-kernel/issues/32 Signed-off-by: Richard Guy Briggs --- fs/proc/base.c | 37 include/linux/audit.h | 16 + include/linux/init_task.h | 4 ++- include/linux/sched.h | 1 + include

[RFC PATCH V1 00/12] audit: implement container id

2018-03-01 Thread Richard Guy Briggs
$containerid -F key=$key || echo failed to add containerid filter rule See: https://github.com/linux-audit/audit-kernel/issues/32 https://github.com/linux-audit/audit-userspace/issues/40 https://github.com/linux-audit/audit-testsuite/issues/64 Richard Guy Briggs (12): audit

[RFC PATCH V1 00/12] audit: implement container id

2018-03-01 Thread Richard Guy Briggs
$containerid -F key=$key || echo failed to add containerid filter rule See: https://github.com/linux-audit/audit-kernel/issues/32 https://github.com/linux-audit/audit-userspace/issues/40 https://github.com/linux-audit/audit-testsuite/issues/64 Richard Guy Briggs (12): audit

Re: [PATCH] audit: return on memory error to avoid null pointer dereference

2018-02-21 Thread Richard Guy Briggs
On 2018-02-21 19:02, Paul Moore wrote: > On Wed, Feb 21, 2018 at 6:49 PM, Paul Moore <p...@paul-moore.com> wrote: > > On Wed, Feb 21, 2018 at 4:30 AM, Richard Guy Briggs <r...@redhat.com> wrote: > >> If there is a memory allocation error when trying to change an a

Re: [PATCH] audit: return on memory error to avoid null pointer dereference

2018-02-21 Thread Richard Guy Briggs
On 2018-02-21 19:02, Paul Moore wrote: > On Wed, Feb 21, 2018 at 6:49 PM, Paul Moore wrote: > > On Wed, Feb 21, 2018 at 4:30 AM, Richard Guy Briggs wrote: > >> If there is a memory allocation error when trying to change an audit > >> kernel feature value, t

[PATCH] audit: return on memory error to avoid null pointer dereference

2018-02-21 Thread Richard Guy Briggs
/76 Signed-off-by: Richard Guy Briggs <r...@redhat.com> --- kernel/audit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/audit.c b/kernel/audit.c index 5c25449..2de74be 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -1059,6 +1059,8 @@ static void audit_log_feature_chan

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