Skip to contentSkip to conversation

audit-viewer "comm" question

DISCUSSION LC Bruzenak 2 participants 4 messages Aug 4, 2008

lore
Share & tools
lore
#0 lore raw

After reading Steve's info about the "comm" field being clipped at 16 chars, I was surprised to see a longer string inside the audit-viewer "comm" field.
I have taken a screen shot, but won't post it unless asked (it's 41K). The "comm" field there is: "/usr/libexec/gnome-settings-daemon", which of course is longer than 16 chars.

The same event in ausearch shows a NULL "comm" field, but the rest of the info lines up with the GUI:

[root@hugo ~]# ausearch -ts today -i -a 126492
----
type=USER_AVC msg=audit(08/04/2008 16:04:24.152:126492) : user pid=23501 uid=root auid=unset subj=system_u:system_r:xdm_xserver_t:s0-s15:c0.c1023 msg='avc: denied { receive } for comm=(null) event=X11:PropertyNotify scontext=user_u:user_r:user_t:s0-s15:c0.c1023 tcontext=user_u:object_r:property_xevent_t:s4:c0,c2,c11,c200.c511 tclass=x_event : exe=/usr/bin/Xorg (sauid=root hostname=?, addr=?, terminal=?)'

Signature · 2 lines
LC (Lenny) Bruzenak
[email protected]
#1 lore raw
Quoted 10 lines · LC Bruzenak

After reading Steve's info about the "comm" field being clipped at 16 chars, I was surprised to see a longer string inside the audit-viewer "comm" field.
I have taken a screen shot, but won't post it unless asked (it's 41K). The "comm" field there is: "/usr/libexec/gnome-settings-daemon", which of course is longer than 16 chars.

The same event in ausearch shows a NULL "comm" field, but the rest of the info lines up with the GUI:

Quoted 10 lines

[root@hugo ~]# ausearch -ts today -i -a 126492
----
type=USER_AVC msg=audit(08/04/2008 16:04:24.152:126492) : user pid=23501 uid=root auid=unset subj=system_u:system_r:xdm_xserver_t:s0-s15:c0.c1023 msg='avc: denied { receive } for comm=(null) event=X11:PropertyNotify scontext=user_u:user_r:user_t:s0-s15:c0.c1023 tcontext=user_u:object_r:property_xevent_t:s4:c0,c2,c11,c200.c511 tclass=x_event : exe=/usr/bin/Xorg (sauid=root hostname=?, addr=?, terminal=?)'

I guess the question here is not why there is > 16 chars (since this is a USER_AVC not kernel-generated event - right?) but rather why the GUI shows the comm but the ausearch doesn't.

Thx,
LCB.

Signature · 2 lines
LC (Lenny) Bruzenak
[email protected]
#3 lore raw
In reply to LC Bruzenak
Quoted 3 lines · On Monday 04 August 2008 18:49:42 LC Bruzenak wrote:

After reading Steve's info about the "comm" field being clipped at 16 chars, I was surprised to see a longer string inside the audit-viewer "comm" field.

If the event below is where it came from, then it originated in user space and is not subject to the 16 byte kernel limitation.

Quoted 2 lines

The same event in ausearch shows a NULL "comm" field, but the rest of the info lines up with the GUI:

The user space AVCs are FUBAR and I told the SE Linux people that they are not following the audit logging convention. They need to fix the code in libselinux.

-Steve

#2 lore raw
In reply to LC Bruzenak
Quoted 10 lines · On Monday 04 August 2008 19:01:43 LC Bruzenak wrote:
Quoted 7 lines

type=USER_AVC msg=audit(08/04/2008 16:04:24.152:126492) : user pid=23501 uid=root auid=unset subj=system_u:system_r:xdm_xserver_t:s0-s15:c0.c1023 msg='avc:  denied  { receive } for  comm=(null) event=X11:PropertyNotify scontext=user_u:user_r:user_t:s0-s15:c0.c1023 tcontext=user_u:object_r:property_xevent_t:s4:c0,c2,c11,c200.c511 tclass=x_event : exe=/usr/bin/Xorg (sauid=root  hostname=?, addr=?, terminal=?)'

I guess the question here is not why there is > 16 chars (since this is a USER_AVC not kernel-generated event - right?)

Yep.

Quoted 1 line

but rather why the GUI shows the comm but the ausearch doesn't.

I think I tried to work around the problem the SE Linux folks are creating and then decided they need to fix the code since I am now violating the audit standard by allowing for the mis-use of field encoding. They should probably both show (null) until this gets fixing in libselinux.

-Steve