Re: Preferred subj= with multiple LSMs

2019-07-18 Thread William Roberts
> > the following (something between option #2 and #3): > > subj1_lsm=smack subj1= subj2_lsm=selinux > > > > subj2= ... > > >>> If it's not a subj= field why use the indirection? > > >>> > > >>> subj_smack= subj_selinux= FWIW +1 on this approach. -- Linux-audit m

Re: Logging from within kernel

2018-11-26 Thread William Roberts
On Mon, Nov 26, 2018 at 8:48 AM Paul Moore wrote: > > On Fri, Nov 23, 2018 at 6:47 PM Ranran wrote: > > Hello, > > > > Is it possible to log all messages from within kernel, (without any > > userspace application and daemon) ? > > If you are not running an audit daemon then the audit records will

Re: A question

2018-09-24 Thread William Roberts
Hence sudo would be required. > > > > frank > > > > > > On 09/24/2018 06:35 AM, William Roberts wrote: > >> Sorry for the HTML... > >> > >> This seems off topic. This is list for questions surrounding the linux > >> audit subsystem. > >

Re: A question

2018-09-23 Thread William Roberts
Sorry for the HTML... This seems off topic. This is list for questions surrounding the linux audit subsystem. That file is usually user=root group=root mode=0644. Ie read only for all, writeable for user root. No sudoers entry needed for read access. On Sun, Sep 23, 2018, 21:30 khalid fahad wro

Re: stop

2018-07-11 Thread William Roberts
Then follow the unsubscribe directions here: https://www.redhat.com/mailman/listinfo/linux-audit Rather then spamming the list. On Wed, Jul 11, 2018 at 6:27 AM, Mauler, Gary [US] (MS) wrote: > I no longer want to receive emails > > > -- > Linux-audit mailing list > Linux-audit@redhat.com > http

Re: Can we delete audit_log_secctx()?

2017-10-20 Thread William Roberts
On Fri, Oct 20, 2017 at 3:16 PM, Casey Schaufler wrote: > The function audit_log_secctx() is unused and cannot be > made safe for the stacked/namespaced security module case. > It, alas, shows up in the KAPI. Can this derelict code be > removed? I'll provide a patch it it can go. It seems to be u

Re: signed tarballs

2017-04-13 Thread William Roberts
On Apr 13, 2017 14:22, "Christian Rebischke" wrote: On Thu, Apr 13, 2017 at 05:05:36PM -0400, Paul Moore wrote: > Unless Steve has exclusive administrative access to people.redhat.com > (I think it is safe to say he does not, but correct me if I'm wrong > Steve ) you can't trust an unsigned check

Re: signed tarballs

2017-04-13 Thread William Roberts
On Apr 13, 2017 14:17, "Paul Moore" wrote: On Thu, Apr 13, 2017 at 5:08 PM, William Roberts wrote: > On Apr 13, 2017 14:05, "Paul Moore" wrote: >> Unless Steve has exclusive administrative access to people.redhat.com >> (I think it is safe to say he do

Re: signed tarballs

2017-04-13 Thread William Roberts
On Apr 13, 2017 14:05, "Paul Moore" wrote: On Thu, Apr 13, 2017 at 5:00 PM, William Roberts wrote: > Isn't the hash on the https people's page? Which last time I looked wasnt > throwing cert errors in chrome. Unless Steve has exclusive administrative access to people

Re: signed tarballs

2017-04-13 Thread William Roberts
On Apr 13, 2017 13:56, "Christian Rebischke" wrote: On Thu, Apr 13, 2017 at 01:30:57PM -0700, William Roberts wrote: > That's not true, he's providing you a detached signature via this > mechanism. You just need to check the sha256sum before extraction. The problem wi

Re: signed tarballs

2017-04-13 Thread William Roberts
On Apr 13, 2017 13:28, "Christian Rebischke" wrote: On Tue, Apr 11, 2017 at 10:03:54AM -0400, Steve Grubb wrote: > I added a sha256sum to the release announcement yesterday. You can also access > the people page via https. > Thanks, but as I stated before. SHA256 and https doesn't ensure a non-m

Re: signed tarballs

2017-04-07 Thread William Roberts
On Apr 7, 2017 4:41 PM, "Christian Rebischke" wrote: On Thu, Apr 06, 2017 at 06:27:08PM -0700, William Roberts wrote: > Why not just checkout the release with git? Because this wouldn't solve the problem or do you use signed commits in your linux-audit git repository? As

Re: signed tarballs

2017-04-06 Thread William Roberts
Why not just checkout the release with git? On Apr 6, 2017 16:36, "Christian Rebischke" wrote: > Hello, > I am the maintainer of 'audit' in the official Arch Linux Repositories. > Is there a reason why you don't provide a signature file for the > releases nor a checksum or am I just stupid and c

Re: [PATCH] audit: remove the audit freelist

2016-11-30 Thread William Roberts
On Nov 29, 2016 07:10, "Florian Westphal" wrote: > > allows better debugging as freeing audit buffers now always honors slub > debug hooks (e.g. object poisoning) and leak checker can detect the > free operation. > > Removal also results in a small speedup (using > single rule 'iptables -A INPUT -

Re: auditd not triggering ANOM_ROOT_TRANS record

2016-10-25 Thread William Roberts
On Oct 25, 2016 06:59, "William Roberts" wrote: > > On Oct 25, 2016 06:48, "William Roberts" wrote: > > > > On Oct 25, 2016 06:42, "teroz" wrote: > > > > > > Hey William > > > exploit is run as a normal user and privile

Re: auditd not triggering ANOM_ROOT_TRANS record

2016-10-25 Thread William Roberts
On Oct 25, 2016 06:48, "William Roberts" wrote: > > On Oct 25, 2016 06:42, "teroz" wrote: > > > > Hey William > > exploit is run as a normal user and privilege escalates to a root shell > > > > Look under the covers. Dirty cow allo

Re: auditd not triggering ANOM_ROOT_TRANS record

2016-10-25 Thread William Roberts
modifies. Take a peak with strace. https://www.google.com/amp/www.theregister.co.uk/AMP/2016/10/21/linux_privilege_escalation_hole/ > On Tue, 25 Oct 2016 at 15:09 William Roberts wrote: >> >> On Oct 25, 2016 05:12, "teroz" wrote: >> > >> > I used one of

Re: auditd not triggering ANOM_ROOT_TRANS record

2016-10-25 Thread William Roberts
On Oct 25, 2016 05:12, "teroz" wrote: > > I used one of the dirtycow root exploits on Fedora24 configured with 30-pci-dss-v31.rules. I was expecting an ANOM_ROOT_TRANS record but didn't get one. What triggers an ANOM_ROOT_TRANS record? What then is the best way to trivially audit for a successful

Re: commands in hex vs ASCII

2016-10-04 Thread William Roberts
You don't always need local access, I look at a lot of logs from systems I don't have access too, and I just decode them using python. I use the snippet from here to do it: http://stackoverflow.com/questions/9641440/convert-from-ascii-string-encoded-in-hex-to-plain-ascii It might not be ideal, I h

Re: [PATCH] selinux: print leading 0x on ioctlcmd audits

2016-07-14 Thread William Roberts
On Thu, Jul 14, 2016 at 4:18 PM, William Roberts wrote: > > > On Thu, Jul 14, 2016 at 3:17 PM, Paul Moore wrote: > >> On Thu, Jul 14, 2016 at 3:29 PM, wrote: >> > From: William Roberts >> > >> > ioctlcmd is currently printing hex numbers, but

Re: [PATCH] selinux: print leading 0x on ioctlcmd audits

2016-07-14 Thread William Roberts
On Thu, Jul 14, 2016 at 3:17 PM, Paul Moore wrote: > On Thu, Jul 14, 2016 at 3:29 PM, wrote: > > From: William Roberts > > > > ioctlcmd is currently printing hex numbers, but their is no leading > > 0x. Thus things like ioctlcmd=1234 are misleading, as

Re: [PATCH V4 (was V6)] audit: use macros for unset inode and device values

2015-08-05 Thread William Roberts
On Aug 1, 2015 12:44 PM, "Richard Guy Briggs" wrote: > > Signed-off-by: Richard Guy Briggs > --- > include/uapi/linux/audit.h |2 ++ > kernel/audit.c |2 +- > kernel/audit_watch.c |8 > kernel/auditsc.c |6 +++--- > 4 files changed, 10 inserti

Definitive guide for audit message types

2014-10-10 Thread William Roberts
For audit log records, the type field can be something like 1400 for an AVC event. I know on the desktop it formats these all to the pretty names IIRC, however I am on Android and were not quite as advanced yet. Is their a definitive guide for each number what they correspond to besides cracking op

Re: [RFC][PATCH] selinux: Report result in avc messages

2014-04-30 Thread William Roberts
Apr 30, 2014 at 9:01 AM, Steve Grubb wrote: > > On Wednesday, April 30, 2014 08:48:31 AM William Roberts wrote: > >> My only nit would be the variable name resultwould it be better > named > >> is_permissive or something? > > > > That adds more bytes. My perso

Re: [RFC][PATCH] selinux: Report result in avc messages

2014-04-30 Thread William Roberts
My only nit would be the variable name resultwould it be better named is_permissive or something? Otherwise LGTM. From the Android camp, this will be very helpful. On Apr 30, 2014 8:43 AM, "Stephen Smalley" wrote: > Attached patch switches to reporting permissive=0|1 and only does it > for a

Audit proctitle/cmdline patches

2014-03-05 Thread William Roberts
All, Just following up on v7 of these patches and the merge status. I'm new to this and trying to find out what I need to do to finish the merge, if anything: https://lkml.org/lkml/2014/2/11/803 https://lkml.org/lkml/2014/2/11/574 https://lkml.org/lkml/2014/2/11/506 Thanks again for everyone's h

[PATCH v7 2/3] proc: Update get proc_pid_cmdline() to use mm.h helpers

2014-02-11 Thread William Roberts
Re-factor proc_pid_cmdline() to use get_cmdline() helper from mm.h. Acked-by: David Rientjes Acked-by: Stephen Smalley Acked-by: Richard Guy Briggs Signed-off-by: William Roberts --- fs/proc/base.c | 36 ++-- 1 file changed, 2 insertions(+), 34 deletions

Re: [PATCH v5 3/3] audit: Audit proc//cmdline aka proctitle

2014-02-11 Thread William Roberts
that were inconvenienced a drink at a conference :-P Bill On Tue, Feb 11, 2014 at 9:47 AM, William Roberts wrote: > The most up to date patches were v6. The difference between v5 and v6 > is rtrim(). Did you not want the rtrim? > Most things end with null bytes, this helps prevent hex-

[PATCH v7 3/3] audit: Audit proc//cmdline aka proctitle

2014-02-11 Thread William Roberts
key=(null) type=UNKNOWN[1327] msg=audit(1391217013.924:386): proctitle=6D6B646972002D70002F7661722F72756E2F636F6E736F6C65 Acked-by: Steve Grubb (wrt record formating) Signed-off-by: William Roberts --- include/uapi/linux/audit.h |1 + kernel/audit.h |6 kernel/auditsc.c | 67 +++

[PATCH v7 1/3] mm: Create utility function for accessing a tasks commandline value

2014-02-11 Thread William Roberts
introduce get_cmdline() for retreiving the value of a processes proc/self/cmdline value. Acked-by: David Rientjes Acked-by: Stephen Smalley Acked-by: Richard Guy Briggs Signed-off-by: William Roberts --- include/linux/mm.h |1 + mm/util.c | 48

Re: [PATCH v5 3/3] audit: Audit proc//cmdline aka proctitle

2014-02-11 Thread William Roberts
kernel&m=139093196518317&w=2 http://marc.info/?l=linux-kernel&m=139093197518332&w=2 Bill On Tue, Feb 11, 2014 at 9:25 AM, William Roberts wrote: > On Tue, Feb 11, 2014 at 8:36 AM, Richard Guy Briggs wrote: >> On 14/02/06, William Roberts wrote: >>> During an

Re: [PATCH v5 3/3] audit: Audit proc//cmdline aka proctitle

2014-02-11 Thread William Roberts
On Tue, Feb 11, 2014 at 8:36 AM, Richard Guy Briggs wrote: > On 14/02/06, William Roberts wrote: >> During an audit event, cache and print the value of the process's >> proctitle value (proc//cmdline). This is useful in situations >> where processes are started via for

[PATCH v5 2/3] proc: Update get proc_pid_cmdline() to use mm.h helpers

2014-02-06 Thread William Roberts
Re-factor proc_pid_cmdline() to use get_cmdline() helper from mm.h. Acked-by: David Rientjes Acked-by: Stephen Smalley Signed-off-by: William Roberts --- fs/proc/base.c | 36 ++-- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/fs/proc/base.c

[PATCH v5 1/3] mm: Create utility function for accessing a tasks commandline value

2014-02-06 Thread William Roberts
introduce get_cmdline() for retreiving the value of a processes proc/self/cmdline value. Acked-by: David Rientjes Acked-by: Stephen Smalley Signed-off-by: William Roberts --- include/linux/mm.h |1 + mm/util.c | 48 2 files

[PATCH v5 3/3] audit: Audit proc//cmdline aka proctitle

2014-02-06 Thread William Roberts
key=(null) type=UNKNOWN[1327] msg=audit(1391217013.924:386): proctitle=6D6B646972002D70002F7661722F72756E2F636F6E736F6C65 Signed-off-by: William Roberts --- include/uapi/linux/audit.h |1 + kernel/audit.h |6 kernel/auditsc.c | 67 3 files cha

[PATCH v6 1/3] mm: Create utility function for accessing a tasks commandline value

2014-01-28 Thread William Roberts
introduce get_cmdline() for retreiving the value of a processes proc/self/cmdline value. Acked-by: David Rientjes Acked-by: Stephen Smalley Signed-off-by: William Roberts --- include/linux/mm.h |1 + mm/util.c | 48 2 files

[PATCH v6 2/3] proc: Update get proc_pid_cmdline() to use mm.h helpers

2014-01-28 Thread William Roberts
Re-factor proc_pid_cmdline() to use get_cmdline() helper from mm.h. Acked-by: David Rientjes Acked-by: Stephen Smalley Signed-off-by: William Roberts --- fs/proc/base.c | 36 ++-- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/fs/proc/base.c

[PATCH v6 3/3] audit: Audit proc cmdline value

2014-01-28 Thread William Roberts
d=1002 gid=1002 euid=1002 suid=1002 fsuid=1002 egid=1002 sgid=1002 fsgid=1002 tty=(none) ses=4294967295 comm="bt_hc_worker" exe="/system/bin/app_process" subj=u:r:bluetooth:s0 key=(null) cmdline="com.android.bluetooth" Signed-off-by: William Roberts --- kernel

[PATCH v5 3/3] audit: Audit proc cmdline value

2014-01-27 Thread William Roberts
d=1002 gid=1002 euid=1002 suid=1002 fsuid=1002 egid=1002 sgid=1002 fsgid=1002 tty=(none) ses=4294967295 comm="bt_hc_worker" exe="/system/bin/app_process" cmdline="com.android.bluetooth" subj=u:r:bluetooth:s0 key=(null) Signed-off-by: William Roberts --- kerne

[PATCH v5 2/3] proc: Update get proc_pid_cmdline() to use mm.h helpers

2014-01-27 Thread William Roberts
Re-factor proc_pid_cmdline() to use get_cmdline() helper from mm.h. Acked-by: David Rientjes Acked-by: Stephen Smalley Signed-off-by: William Roberts --- fs/proc/base.c | 36 ++-- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/fs/proc/base.c

[PATCH v5 1/3] mm: Create utility function for accessing a tasks commandline value

2014-01-27 Thread William Roberts
introduce get_cmdline() for retreiving the value of a processes proc/self/cmdline value. Acked-by: David Rientjes Acked-by: Stephen Smalley Signed-off-by: William Roberts --- include/linux/mm.h |1 + mm/util.c | 48 2 files

[PATCH v4 3/3] audit: Audit proc cmdline value

2014-01-27 Thread William Roberts
d=1002 gid=1002 euid=1002 suid=1002 fsuid=1002 egid=1002 sgid=1002 fsgid=1002 tty=(none) ses=4294967295 comm="bt_hc_worker" exe="/system/bin/app_process" cmdline="com.android.bluetooth" subj=u:r:bluetooth:s0 key=(null) Signed-off-by: William Roberts --- kerne

[PATCH v4 2/3] proc: Update get proc_pid_cmdline() to use mm.h helpers

2014-01-27 Thread William Roberts
Re-factor proc_pid_cmdline() to use get_cmdline() helper from mm.h. Signed-off-by: William Roberts --- fs/proc/base.c | 36 ++-- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 5150706..f0c5927 100644 --- a

[PATCH v4 1/3] mm: Create utility function for accessing a tasks commandline value

2014-01-27 Thread William Roberts
introduce get_cmdline() for retreiving the value of a processes proc/self/cmdline value. Signed-off-by: William Roberts --- include/linux/mm.h |1 + mm/util.c | 48 2 files changed, 49 insertions(+) diff --git a/include/linux/mm.h

Re: [PATCH v3 3/3] audit: Audit proc cmdline value

2014-01-16 Thread William Roberts
On Thu, Jan 16, 2014 at 8:40 AM, William Roberts wrote: > On Thu, Jan 16, 2014 at 7:11 AM, Steve Grubb wrote: >> On Thursday, January 16, 2014 07:03:34 AM William Roberts wrote: >>> On Thu, Jan 16, 2014 at 6:02 AM, Steve Grubb wrote: >>> > On Wednesday, Januar

Re: [PATCH v3 3/3] audit: Audit proc cmdline value

2014-01-16 Thread William Roberts
On Thu, Jan 16, 2014 at 6:02 AM, Steve Grubb wrote: > On Wednesday, January 15, 2014 09:08:39 PM William Roberts wrote: >> >> > Try this, >> >> > >> >> > cp /bin/ls 'test test test' >> >> > auditctll -a always,exit -

Re: [PATCH v3 3/3] audit: Audit proc cmdline value

2014-01-15 Thread William Roberts
On Wed, Jan 15, 2014 at 8:51 PM, Steve Grubb wrote: > On Wednesday, January 15, 2014 05:44:29 PM William Roberts wrote: >> On Wed, Jan 15, 2014 at 5:33 PM, Steve Grubb wrote: >> > On Wednesday, January 15, 2014 05:08:13 PM William Roberts wrote: >> >> On Wed, Jan 15

Re: [PATCH v3 3/3] audit: Audit proc cmdline value

2014-01-15 Thread William Roberts
On Wed, Jan 15, 2014 at 5:33 PM, Steve Grubb wrote: > On Wednesday, January 15, 2014 05:08:13 PM William Roberts wrote: >> On Wed, Jan 15, 2014 at 4:54 PM, Steve Grubb wrote: >> > On Wednesday, January 15, 2014 01:02:14 PM William Roberts wrote: >> >> During an au

Re: [PATCH v3 3/3] audit: Audit proc cmdline value

2014-01-15 Thread William Roberts
On Wed, Jan 15, 2014 at 4:54 PM, Steve Grubb wrote: > On Wednesday, January 15, 2014 01:02:14 PM William Roberts wrote: >> During an audit event, cache and print the value of the process's >> cmdline value (proc//cmdline). This is useful in situations >> where proces

[PATCH v3 2/3] proc: Update get proc_pid_cmdline() to use mm.h helpers

2014-01-15 Thread William Roberts
Re-factor proc_pid_cmdline() to use get_cmdline() helper from mm.h. Acked-by: David Rientjes Acked-by: Stephen Smalley Signed-off-by: William Roberts --- fs/proc/base.c | 36 ++-- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/fs/proc/base.c

[PATCH v3 3/3] audit: Audit proc cmdline value

2014-01-15 Thread William Roberts
d=1002 gid=1002 euid=1002 suid=1002 fsuid=1002 egid=1002 sgid=1002 fsgid=1002 tty=(none) ses=4294967295 comm="bt_hc_worker" exe="/system/bin/app_process" cmdline="com.android.bluetooth" subj=u:r:bluetooth:s0 key=(null) Signed-off-by: William Roberts --- kernel

[PATCH v3 1/3] mm: Create utility function for accessing a tasks commandline value

2014-01-15 Thread William Roberts
introduce get_cmdline() for retreiving the value of a processes proc/self/cmdline value. Acked-by: David Rientjes Acked-by: Stephen Smalley Signed-off-by: William Roberts --- include/linux/mm.h |1 + mm/util.c | 48 2 files

Re: [RFC][PATCH 3/3] audit: Audit proc cmdline value

2014-01-14 Thread William Roberts
This bounced LKML, re-sending. My phone sent it as HTML On Tue, Jan 14, 2014 at 7:50 PM, William Roberts wrote: > The race was non existent. I had the VMA locked. I switched to this to keep > the code that gets the cmdline value almost unchanged to try and reduce > bugs. I can still

Re: [RFC][PATCH 3/3] audit: Audit proc cmdline value

2014-01-14 Thread William Roberts
smaller. On Jan 14, 2014 5:45 PM, "Richard Guy Briggs" wrote: > On 14/01/06, William Roberts wrote: > > During an audit event, cache and print the value of the process's > > cmdline value (proc//cmdline). This is useful in situations > > where processes are

[RFC][PATCH v2 3/3] audit: Audit proc cmdline value

2014-01-13 Thread William Roberts
d=1002 gid=1002 euid=1002 suid=1002 fsuid=1002 egid=1002 sgid=1002 fsgid=1002 tty=(none) ses=4294967295 comm="bt_hc_worker" exe="/system/bin/app_process" cmdline="com.android.bluetooth" subj=u:r:bluetooth:s0 key=(null) Signed-off-by: William Roberts --- kernel/audit

Re: [RFC][PATCH v3 3/3] audit: Audit proc cmdline value

2014-01-13 Thread William Roberts
On Mon, Jan 13, 2014 at 12:02 PM, William Roberts wrote: > During an audit event, cache and print the value of the process's > cmdline value (proc//cmdline). This is useful in situations > where processes are started via fork'd virtual machines where the > comm field is

[RFC][PATCH v2 2/3] proc: Update get proc_pid_cmdline() to use mm.h helpers

2014-01-13 Thread William Roberts
Re-factor proc_pid_cmdline() to use get_cmdline() helper from mm.h. Signed-off-by: William Roberts --- fs/proc/base.c | 36 ++-- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 03c8d74..cfd178d 100644 --- a

[RFC][PATCH v3 3/3] audit: Audit proc cmdline value

2014-01-13 Thread William Roberts
d=1002 gid=1002 euid=1002 suid=1002 fsuid=1002 egid=1002 sgid=1002 fsgid=1002 tty=(none) ses=4294967295 comm="bt_hc_worker" exe="/system/bin/app_process" subj=u:r:bluetooth:s0 key=(null) cmdline="com.android.bluetooth" Signed-off-by: William Roberts --- kernel/audit

[RFC][PATCH v2 1/3] mm: Create utility function for accessing a tasks commandline value

2014-01-13 Thread William Roberts
introduce get_cmdline() for retreiving the value of a processes proc/self/cmdline value. Signed-off-by: William Roberts --- include/linux/mm.h |1 + mm/util.c | 48 2 files changed, 49 insertions(+) diff --git a/include/linux/mm.h

Re: [PATCH] squash: review-updates

2014-01-10 Thread William Roberts
good. And is then directly known to be safe to pass to audit_log_untrusted_string(), which aborts printing on the first null byte. On Fri, Jan 10, 2014 at 1:37 PM, William Roberts wrote: > I think your right > > On Fri, Jan 10, 2014 at 1:08 PM, Eric Paris wrote: >> If you know t

Re: [PATCH] squash: review-updates

2014-01-10 Thread William Roberts
I think your right On Fri, Jan 10, 2014 at 1:08 PM, Eric Paris wrote: > If you know the buf len, you can just use audit_log_n_untrusted_string() > I think > > On Tue, 2014-01-07 at 12:44 -0800, William Roberts wrote: >> Signed-off-by: William Roberts >> --- >

Re: [PATCH] squash: review-updates

2014-01-08 Thread William Roberts
On Tue, Jan 7, 2014 at 12:44 PM, William Roberts wrote: > Signed-off-by: William Roberts > --- > kernel/auditsc.c | 19 +++ > 1 file changed, 15 insertions(+), 4 deletions(-) > > diff --git a/kernel/auditsc.c b/kernel/auditsc.c > index a4c2003..9ba1f2a

[RFC][PATCH] - auditing cmdline

2014-01-07 Thread William Roberts
Just some updates from the review that I have gathered. 1. Possibility of accessing invalid memory on res being 0. 2. Do not switch ordering of fields. Does anyone hate using the boolean expression to get my increment value? Removes some branches. Based on my loose understanding that boolean opera

[PATCH] squash: review-updates

2014-01-07 Thread William Roberts
Signed-off-by: William Roberts --- kernel/auditsc.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/kernel/auditsc.c b/kernel/auditsc.c index a4c2003..9ba1f2a 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -1292,9 +1292,20 @@ static void

Re: [RFC] Comments on audit command line failure

2014-01-07 Thread William Roberts
On Tue, Jan 7, 2014 at 8:34 AM, Steve Grubb wrote: > On Monday, January 06, 2014 07:38:02 PM William Roberts wrote: >> I've been doing some testing of the recent audit cmdline patches, >> notably as many as the error paths as I can. >> >> On a failure, the field i

Re: [RFC] Comments on audit command line failure

2014-01-07 Thread William Roberts
On Jan 6, 2014 7:38 PM, "William Roberts" wrote: > > I've been doing some testing of the recent audit cmdline patches, > notably as many as the error paths as I can. > > On a failure, the field is populated with null, like when key is null. > However, it has

[RFC] Comments on audit command line failure

2014-01-06 Thread William Roberts
I've been doing some testing of the recent audit cmdline patches, notably as many as the error paths as I can. On a failure, the field is populated with null, like when key is null. However, it has quotes, should I drop the quotes... Example: Now: cmdline="(null)" key=(null) Proposed: cmdline=(

Re: [RFC][PATCH 3/3] audit: Audit proc cmdline value

2014-01-06 Thread William Roberts
t; > On Mon, Jan 06, 2014 at 07:30:30AM -0800, William Roberts wrote: >> +static void audit_log_cmdline(struct audit_buffer *ab, struct task_struct >> *tsk, >> + struct audit_context *context) >> +{ >> + int res; >> + char *buf; &

[RFC][PATCH 3/3] audit: Audit proc cmdline value

2014-01-06 Thread William Roberts
d=1002 gid=1002 euid=1002 suid=1002 fsuid=1002 egid=1002 sgid=1002 fsgid=1002 tty=(none) ses=4294967295 comm="bt_hc_worker" exe="/system/bin/app_process" cmdline="com.android.bluetooth" subj=u:r:bluetooth:s0 key=(null) Signed-off-by: William Roberts --- kernel/au

[RFC][PATCH 2/3] proc: Update get proc_pid_cmdline() to use mm.h helpers

2014-01-06 Thread William Roberts
Re-factor proc_pid_cmdline() to use get_cmdline() helper from mm.h. Signed-off-by: William Roberts --- fs/proc/base.c | 36 ++-- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 03c8d74..cfd178d 100644 --- a

[RFC][PATCH 1/3] mm: Create utility function for accessing a tasks commandline value

2014-01-06 Thread William Roberts
introduce get_cmdline() for retreiving the value of a processes proc/self/cmdline value. Signed-off-by: William Roberts --- include/linux/mm.h |1 + mm/util.c | 48 2 files changed, 49 insertions(+) diff --git a/include/linux/mm.h

Re: Architecture of auditd

2013-12-26 Thread William Roberts
Yes youre missing setting the audit pid so the kernel knows who to send messages too. I wrote an auditd from scratch for android, feel free to look at the code. Its very simple, and includes the libaudit pieces I needed to re-implement to get a version that was NOT GPL'd. Recently it got a bit mo

[RFC][PATCH 1/3] mm: Create utility function for accessing a tasks commandline value

2013-12-23 Thread William Roberts
introduce get_cmdline() for retreiving the value of a processes proc/self/cmdline value. Signed-off-by: William Roberts --- include/linux/mm.h |1 + mm/util.c | 48 2 files changed, 49 insertions(+) diff --git a/include/linux/mm.h

[RFC][PATCH 2/3] proc: Update get proc_pid_cmdline() to use mm.h helpers

2013-12-23 Thread William Roberts
Re-factor proc_pid_cmdline() to use get_cmdline() helper from mm.h. Signed-off-by: William Roberts --- fs/proc/base.c | 36 ++-- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 03c8d74..cfd178d 100644 --- a

[RFC][PATCH 3/3] audit: Audit proc cmdline value

2013-12-23 Thread William Roberts
d=1002 gid=1002 euid=1002 suid=1002 fsuid=1002 egid=1002 sgid=1002 fsgid=1002 tty=(none) ses=4294967295 comm="bt_hc_worker" exe="/system/bin/app_process" cmdline="com.android.bluetooth" subj=u:r:bluetooth:s0 key=(null) Signed-off-by: William Roberts --- kernel/au

Re: [PATCH][RFC] audit: log namespace inode numbers

2013-12-21 Thread William Roberts
I'm doing work now involving namespacesthe necessity is real. I'll take a look early next week. On Dec 20, 2013 10:34 PM, "Richard Guy Briggs" wrote: > Log the namespace details of a task. > --- > > Does anyone have comments on this patch? > > I'm looking for guidance on which types of messa

Re: [PATCH 1/3] mm: Create utility functions for accessing a tasks commandline value

2013-12-13 Thread William Roberts
On Fri, Dec 13, 2013 at 10:26 AM, William Roberts wrote: > On Fri, Dec 13, 2013 at 10:04 AM, Stephen Smalley wrote: >> On 12/13/2013 09:51 AM, William Roberts wrote: >>> On Fri, Dec 13, 2013 at 9:12 AM, Stephen Smalley wrote: >>>> Also, why not just get_task_mm(ta

Re: [PATCH 1/3] mm: Create utility functions for accessing a tasks commandline value

2013-12-13 Thread William Roberts
On Fri, Dec 13, 2013 at 10:04 AM, Stephen Smalley wrote: > On 12/13/2013 09:51 AM, William Roberts wrote: >> On Fri, Dec 13, 2013 at 9:12 AM, Stephen Smalley wrote: >>> Also, why not just get_task_mm(task) within the function rather than >>> pass it in by the caller? &

Re: [PATCH 2/3] proc: Update get proc_pid_cmdline() to use mm.h helpers

2013-12-13 Thread William Roberts
On Fri, Dec 13, 2013 at 9:23 AM, Stephen Smalley wrote: > On 12/02/2013 04:10 PM, William Roberts wrote: >> Re-factor proc_pid_cmdline() to use get_cmdline_length() and >> copy_cmdline() helpers from mm.h >> >> Signed-off-by: William Roberts >&

Re: [PATCH 1/3] mm: Create utility functions for accessing a tasks commandline value

2013-12-13 Thread William Roberts
On Fri, Dec 13, 2013 at 9:12 AM, Stephen Smalley wrote: > On 12/02/2013 04:10 PM, William Roberts wrote: >> Add two new functions to mm.h: >> * copy_cmdline() >> * get_cmdline_length() >> >> Signed-off-by: William Roberts >> --- >> include/linux/mm.h

[RFC] [PATCH] - auditing cmdline

2013-12-11 Thread William Roberts
all, I sent out some patches a while back (12/2) that affect mm, procfs and audit. The audit patch (PATCH 3/3) was ack'd on by Richard Guy Briggs. But the other patches I have not heard anything on. Patches: [PATCH 1/3] mm: Create utility functions for accessing a tasks commandline value [PATCH 2

Re: [PATCH] - auditing cmdline

2013-12-06 Thread William Roberts
Sigh...I sent this back out from another emai address and got bounced from the lists... resending. Sorry for the cruft. On Fri, Dec 6, 2013 at 7:34 AM, William Roberts wrote: > I sent out 3 patches on 12/2/2013. I didn't get any response. I thought I > added the right peop

[PATCH 2/3] proc: Update get proc_pid_cmdline() to use mm.h helpers

2013-12-02 Thread William Roberts
Re-factor proc_pid_cmdline() to use get_cmdline_length() and copy_cmdline() helpers from mm.h Signed-off-by: William Roberts --- fs/proc/base.c | 35 ++- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index

[PATCH 1/3] mm: Create utility functions for accessing a tasks commandline value

2013-12-02 Thread William Roberts
Add two new functions to mm.h: * copy_cmdline() * get_cmdline_length() Signed-off-by: William Roberts --- include/linux/mm.h |7 +++ mm/util.c | 48 2 files changed, 55 insertions(+) diff --git a/include/linux/mm.h b/include

[PATCH 3/3] audit: Audit proc cmdline value

2013-12-02 Thread William Roberts
ple of where this is useful and applicable is in the realm of Android. The cached cmdline is tied to the lifecycle of the audit_context structure and is built on demand. Signed-off-by: William Roberts --- kernel/audit.h |1 + kernel/auditsc.c | 82 +++

[PATCH] - auditing cmdline

2013-12-02 Thread William Roberts
This patch series relates to work started on the audit mailing list. It eventually involved touching other modules, so I am trying to pull in those owners as well. In a nutshell I add new utility functions for accessing a processes cmdline value as displayed in proc//cmdline, and then refactor proc

Re: Follow up on command line auditing

2013-12-02 Thread William Roberts
On Mon, Dec 2, 2013 at 9:18 AM, Richard Guy Briggs wrote: > On Mon, Dec 02, 2013 at 08:20:10AM -0800, William Roberts wrote: >> On Mon, Dec 2, 2013 at 8:07 AM, Richard Guy Briggs wrote: >> > On Mon, Dec 02, 2013 at 07:42:20AM -0800, William Roberts wrote: >> >

Re: Follow up on command line auditing

2013-12-02 Thread William Roberts
On Mon, Dec 2, 2013 at 8:07 AM, Richard Guy Briggs wrote: > On Mon, Dec 02, 2013 at 07:42:20AM -0800, William Roberts wrote: >> Changelog since last post: >> * Rebase on latest master >> >> [PATCH] audit: Audit proc cmdline value > > Hi Bill, > > I

[PATCH] audit: Audit proc cmdline value

2013-12-02 Thread William Roberts
ple of where this is useful and applicable is in the realm of Android. The cached cmdline is tied to the lifecycle of the audit_context structure and is built on demand. Signed-off-by: William Roberts --- fs/proc/base.c | 35 +++--- include/linux/mm.h |7 + kerne

Follow up on command line auditing

2013-12-02 Thread William Roberts
Just following up on this since the holiday, any traction? Changelog since last post: * Rebase on latest master [PATCH] audit: Audit proc cmdline value -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit

[PATCH] audit: Audit proc cmdline value

2013-11-25 Thread William Roberts
ple of where this is useful and applicable is in the realm of Android. The cached cmdline is tied to the lifecycle of the audit_context structure and is built on demand. Signed-off-by: William Roberts --- fs/proc/base.c | 35 +++--- include/linux/mm.h |7 + kerne

Updated patches

2013-11-25 Thread William Roberts
What's changed since last time? * Squashed all the patches down * Patches are relative to master This is the version I would like to get merged. [PATCH] audit: Audit proc cmdline value -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit

Re: [DRAFT v3.4] - audit cmdline updates

2013-11-20 Thread William Roberts
Also, updating to a master kernel now, to try and publish relative to that. On Wed, Nov 20, 2013 at 5:29 PM, William Roberts wrote: > Changes since last publish: > * Ran all patches through checkpatch, some elluded me. > * Changed cmdline copy/length API to reduce task_mm_get() mmpu

[PATCH 1/4] audit: Allow auditing of proc/self/cmdline value

2013-11-20 Thread William Roberts
t via PR_SET_NAME. The other benefit is this is not limited to 16 bytes as COMM historically has. Change-Id: I9bf0928a8aa249d22ecd55fa9cd27325dd394eb1 Signed-off-by: William Roberts --- fs/proc/base.c |2 +- include/linux/proc_fs.h |1 + kernel/auditsc.c|

[PATCH 4/4] SQUASH audit: Change cmdline get API to reduce locking

2013-11-20 Thread William Roberts
Each call to length copy required a call to get_task_mm() and mmput. Just require the caller to aquire and pass a valid mm. Change-Id: Id7069b80f1cbea5b30032a0a459dd54b7446f665 Signed-off-by: William Roberts --- fs/proc/base.c | 63

[DRAFT v3.4] - audit cmdline updates

2013-11-20 Thread William Roberts
Changes since last publish: * Ran all patches through checkpatch, some elluded me. * Changed cmdline copy/length API to reduce task_mm_get() mmput() calls Still need to know: * Any major objecttions to this still? * My public API changes are in proc, is this the best spot for those? As always, th

[PATCH 2/4] audit: Enable cacheing of cmdline in audit_context

2013-11-20 Thread William Roberts
Rather then reading from userspace on every call, cache the page in the audit_context and couple to that objects life-cycle. Change-Id: Ia0d432bc4aba8588840f0dc0026a1e9483e5b485 Signed-off-by: William Roberts --- kernel/auditsc.c | 48 +--- 1 file

[PATCH 3/4] audit: dont allocate whole pages

2013-11-20 Thread William Roberts
Rather then cacheing whole pages, use kmalloc to potentially cache a smaller size. Change-Id: I9fb749dc2bdac506d1bc6f2259fbbdeeec87b298 Signed-off-by: William Roberts --- fs/proc/base.c | 93 +++ include/linux/proc_fs.h |5 ++- kernel

Re: [PATCH 1/1] Added exe field to audit core dump signal log

2013-11-20 Thread William Roberts
On Wed, Nov 20, 2013 at 2:03 PM, William Roberts wrote: > On Wed, Nov 20, 2013 at 1:47 PM, Richard Guy Briggs wrote: >> On Thu, Nov 14, 2013 at 08:56:57AM +0530, Paul Davies C wrote: >>> Currently when the coredump signals are logged by the audit system , the >>> actua

Re: [PATCH 1/1] Added exe field to audit core dump signal log

2013-11-20 Thread William Roberts
On Wed, Nov 20, 2013 at 1:47 PM, Richard Guy Briggs wrote: > On Thu, Nov 14, 2013 at 08:56:57AM +0530, Paul Davies C wrote: >> Currently when the coredump signals are logged by the audit system , the >> actual path to the executable is not logged. Without details of exe , the >> system admin may n

  1   2   >