]> xenbits.xensource.com Git - libvirt.git/commit
security: SELinux: fix the transaction model's list append
authorErik Skultety <eskultet@redhat.com>
Tue, 17 Jan 2017 11:22:14 +0000 (12:22 +0100)
committerErik Skultety <eskultet@redhat.com>
Tue, 17 Jan 2017 14:49:57 +0000 (15:49 +0100)
commit7e8b2da74f1322050a993ca988bfbea997a84355
treebd18c3c620542fee13b5a358f6f61ee11e9a4c40
parentdf7f42d5bea7b98483aab510748eded5f6e8f437
security: SELinux: fix the transaction model's list append

The problem is in the way how the list item is created prior to
appending it to the transaction list - the @path argument is just a
shallow copy instead of deep copy of the hostdev device's path.
Unfortunately, the hostdev devices from which the @path is extracted, in
order to add them into the transaction list, are only temporary and
freed before the buildup of the qemu namespace, thus making the @path
attribute in the transaction list NULL, causing 'permission denied' or
'double free' or 'unknown cause' errors.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1413773

Signed-off-by: Erik Skultety <eskultet@redhat.com>
src/security/security_selinux.c