Bug 958839
Summary: | Cgroup audit events with path are not escaped | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Chris Pelland <cpelland> |
Component: | libvirt | Assignee: | Eric Blake <eblake> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 6.4 | CC: | acathrow, berrange, bili, clalancette, cpelland, dallan, dyasny, dyuan, eblake, itamar, jdenemar, jforbes, jyang, laine, libvirt-maint, mzhan, pm-eus, rwu, sgrubb, veillard, whuang |
Target Milestone: | rc | Keywords: | ZStream |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-0.10.2-18.el6_4.5 | Doc Type: | Bug Fix |
Doc Text: |
Previously, libvirt used the wrong variable when constructing audit messages. This led to invalid audit messages, causing ausearch to format certain entries as having "path=(null)" instead of the correct path. This could prevent ausearch from locating events related to cgroup device ACL modifications for guests managed by libvirt. With this update, the audit messages are generated correctly, preventing loss of audit coverage.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2013-05-16 14:34:45 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 922203 | ||
Bug Blocks: |
Description
Chris Pelland
2013-05-02 13:55:22 UTC
Hi, Eric I try to verify this bug with libvirt-0.10.2-18.el6_4.5.x86_64 But I still get some log in audit like the issue one Is there some new issues ? steps : 1) start a vm 2) #ausearch --start recent -m VIRT_RESOURCE -i | grep cgroup | grep '/dev' ... type=VIRT_RESOURCE msg=audit(06/05/13 11:21:08.388:37064) : user pid=30449 uid=root auid=root ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup reason=allow vm=s uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd cgroup=/cgroup/devices/libvirt/qemu/s/ class=path path=/dev/hpet rdev=0A:E4 acl=rw exe=/usr/sbin/libvirtd hostname=? addr=? terminal=? res=success' ... 3) $ rpm -q libvirt libvirt-0.10.2-18.el6_4.5.x86_64 #rpm -q libvirt libvirt-0.10.2-18.el6_4.5.x86_64 #virsh start s #cat /var/log/audit/audit.log |grep cgroup type=VIRT_RESOURCE msg=audit(1367833495.894:37444): user pid=1183 uid=0 auid=0 ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup reason=deny vm="s" uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd cgroup="/cgroup/devices/libvirt/qemu/s/" class=all exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=success' type=VIRT_RESOURCE msg=audit(1367833495.894:37445): user pid=1183 uid=0 auid=0 ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup reason=allow vm="s" uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd cgroup="/cgroup/devices/libvirt/qemu/s/" class=major category=pty maj=88 acl=rw exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=success' type=VIRT_RESOURCE msg=audit(1367833495.894:37446): user pid=1183 uid=0 auid=0 ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup reason=allow vm="s" uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd cgroup="/cgroup/devices/libvirt/qemu/s/" class=path path="/dev/null" rdev=01:03 acl=rw exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=success' type=VIRT_RESOURCE msg=audit(1367833495.894:37447): user pid=1183 uid=0 auid=0 ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup reason=allow vm="s" uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd cgroup="/cgroup/devices/libvirt/qemu/s/" class=path path="/dev/full" rdev=01:07 acl=rw exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=success' type=VIRT_RESOURCE msg=audit(1367833495.895:37448): user pid=1183 uid=0 auid=0 ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup reason=allow vm="s" uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd cgroup="/cgroup/devices/libvirt/qemu/s/" class=path path="/dev/zero" rdev=01:05 acl=rw exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=success' type=VIRT_RESOURCE msg=audit(1367833495.895:37449): user pid=1183 uid=0 auid=0 ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup reason=allow vm="s" uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd cgroup="/cgroup/devices/libvirt/qemu/s/" class=path path="/dev/random" rdev=01:08 acl=rw exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=success' type=VIRT_RESOURCE msg=audit(1367833495.895:37450): user pid=1183 uid=0 auid=0 ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup reason=allow vm="s" uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd cgroup="/cgroup/devices/libvirt/qemu/s/" class=path path="/dev/urandom" rdev=01:09 acl=rw exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=success' type=VIRT_RESOURCE msg=audit(1367833495.895:37451): user pid=1183 uid=0 auid=0 ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup reason=allow vm="s" uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd cgroup="/cgroup/devices/libvirt/qemu/s/" class=path path="/dev/ptmx" rdev=05:02 acl=rw exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=success' type=VIRT_RESOURCE msg=audit(1367833495.895:37452): user pid=1183 uid=0 auid=0 ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup reason=allow vm="s" uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd cgroup="/cgroup/devices/libvirt/qemu/s/" class=path path="/dev/kvm" rdev=0A:E8 acl=rw exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=success' type=VIRT_RESOURCE msg=audit(1367833495.895:37453): user pid=1183 uid=0 auid=0 ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup reason=allow vm="s" uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd cgroup="/cgroup/devices/libvirt/qemu/s/" class=path path="/dev/rtc" rdev=FE:00 acl=rw exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=success' type=VIRT_RESOURCE msg=audit(1367833495.895:37454): user pid=1183 uid=0 auid=0 ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup reason=allow vm="s" uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd cgroup="/cgroup/devices/libvirt/qemu/s/" class=path path="/dev/hpet" rdev=0A:E4 acl=rw exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=success' (In reply to comment #6) > Hi, Eric > I try to verify this bug with libvirt-0.10.2-18.el6_4.5.x86_64 > But I still get some log in audit like the issue one > Is there some new issues ? You _want_ audit log entries. The bug was that since the audit entries were malformed, the grep would previously list nothing. > #ausearch --start recent -m VIRT_RESOURCE -i | grep cgroup | grep '/dev' This command would fail when the bug was present, but should now have hits. > > ... > type=VIRT_RESOURCE msg=audit(06/05/13 11:21:08.388:37064) : user pid=30449 > uid=root auid=root ses=2388 > subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 msg='virt=kvm resrc=cgroup > reason=allow vm=s uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd > cgroup=/cgroup/devices/libvirt/qemu/s/ class=path path=/dev/hpet rdev=0A:E4 When libvirt was broken, ausearch would say path=(null) instead of path=/dev/hpet. (In reply to comment #7) > type=VIRT_RESOURCE msg=audit(1367833495.894:37446): user pid=1183 uid=0 > auid=0 ses=2388 subj=unconfined_u:system_r:virtd_t:s0-s0:c0.c1023 > msg='virt=kvm resrc=cgroup reason=allow vm="s" > uuid=f3641c4c-7174-3464-6682-0d0cdfa9c3bd > cgroup="/cgroup/devices/libvirt/qemu/s/" class=path path="/dev/null" > rdev=01:03 acl=rw exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? > res=success' and when libvirt was broken, audit.log would say path=/dev/null instead of the correct path="/dev/null". You have verified that the fix made it in. Thanks very much Eric set Verified according to Comment 8 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0831.html |