linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Wieprecht, Karen M." <Karen.Wieprecht@jhuapl.edu>
To: 'Steve Grubb' <sgrubb@redhat.com>,
	"linux-audit@redhat.com" <linux-audit@redhat.com>
Subject: RE: [EXT] Re: 128 Character limit on proctitle field?
Date: Wed, 20 Sep 2023 18:11:34 +0000	[thread overview]
Message-ID: <4f6baa4aac334527b0f0380a18a2d718@jhuapl.edu> (raw)
In-Reply-To: <3785033.kQq0lBPeGt@x2>

Spotted the EXECVE arguments as well,  I'll definitely need to look here since the proctitle is limited to 128 chars.   Appreciate the feedback and info, thanks!

-----Original Message-----
From: Steve Grubb <sgrubb@redhat.com> 
Sent: Tuesday, September 19, 2023 7:32 PM
To: linux-audit@redhat.com
Cc: Wieprecht, Karen M. <Karen.Wieprecht@jhuapl.edu>
Subject: [EXT] Re: 128 Character limit on proctitle field?

APL external email warning: Verify sender sgrubb@redhat.com before clicking links or attachments 

On Friday, September 15, 2023 12:15:12 PM EDT Wieprecht, Karen M. wrote:
> We're working with Docker and podman, and I'm working on parsing the 
> audit data we get to flag prohibited and missing command options based on STIG
> guidelines.   I normally extract the proctitle from the raw auditd data ,
> but these commands are very long with sometimes 23 or more command 
> line parameters ,  and I noticed that all of the auditd proctitle data 
> for the lengthier commands is being cut off at 128 characters.

The proctitle event commit message explains why it was created:
https://listman.redhat.com/archives/linux-audit/2014-February/008778.html

The comm field is only 16 characters long. So, it tries to capture the first
128 bytes so that at least android comm fields can be deduced since they are almost always larger than 16 bytes.

> I'm bringing this up  for two reasons:
> 
>      One,  not everyone working with this data may realize that there 
> seems to be a character limit, and second, if this is by chance a bug 
> as opposed to intentional,  then I'm hoping we can get a fix cooking for it?

The record that contains all of the command line is the execve record. It has all parameters even if it's 10,000. So, you may want to try auditing by exec of specific applications to get everything.

Also, as mentioned in the commit, proctitle is based off of comm. This can be controlled by user space to misdirect attention by spoof the program name.

> In the meantime,  I may be able to work around this by piecing 
> together the full command from the "a#= "  fields, but it would be 
> much easier if proctitle wasn't cut off after 128 chars.
> 
> Thanks, any info you can share would be much appreciated,

This was intentional. There was a long discussion of this in January and February of 2014 if you want more background.

-Steve


--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit

      reply	other threads:[~2023-09-20 18:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-15 16:15 128 Character limit on proctitle field? Wieprecht, Karen M.
2023-09-18  2:38 ` Tetsuo Handa
2023-09-19 23:32 ` Steve Grubb
2023-09-20 18:11   ` Wieprecht, Karen M. [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f6baa4aac334527b0f0380a18a2d718@jhuapl.edu \
    --to=karen.wieprecht@jhuapl.edu \
    --cc=linux-audit@redhat.com \
    --cc=sgrubb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).