[libvirt] Potential segfault in udev driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



udevDeviceMonitorStartup registers udevEventHandleCallback as event
handle, but doesn't store the returned watch id to remove it later on.
Also it's not clear to me whether the event handle should be register
for the whole lifetime of the udev driver instance or just for the
udevEnumerateDevices call.

If for example the call to udevSetupSystemDev [1] fails
udevDeviceMonitorShutdown is called to cleanup, but
udevEventHandleCallback is still registered and may be called when
driverState is NULL again, resulting in a segfault in
udevEventHandleCallback.

So to solve this the udevEventHandleCallback event handle must be
removed at the appropriate place.

Maximilian Wilhelm found this problem.

[1] 22:42:20.960: error : udevSetupSystemDev:1460 : Failed to get udev
device for syspath '/sys/devices/virtual/dmi/id' or
'/sys/class/dmi/id'

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]