]> git.ipfire.org Git - thirdparty/libvirt.git/commit
security: DAC: fix the transaction model's list append
authorErik Skultety <eskultet@redhat.com>
Tue, 17 Jan 2017 11:21:27 +0000 (12:21 +0100)
committerErik Skultety <eskultet@redhat.com>
Tue, 17 Jan 2017 14:49:57 +0000 (15:49 +0100)
commitdf7f42d5bea7b98483aab510748eded5f6e8f437
tree105ae12d38e3e4f0f3210b9399acc6e0ef4e98b6
parentf66b185c46f765b6c3ef7f82f7e4644db16c1329
security: DAC: 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 attribute 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_dac.c