If the XML security model is NULL, it is assumed that the current
model will be used with dynamic labelling. The verify step is
meaningless and potentially crashes if dereferencing NULL
* src/security/security_manager.c: Skip NULL model on verify
int virSecurityManagerVerify(virSecurityManagerPtr mgr,
virDomainDefPtr def)
{
+ const virSecurityLabelDefPtr secdef = &def->seclabel;
+ /* NULL model == dynamic labelling, with whatever driver
+ * is active, so we can short circuit verify check to
+ * avoid drivers de-referencing NULLs by accident
+ */
+ if (!secdef->model)
+ return 0;
+
if (mgr->drv->domainSecurityVerify)
return mgr->drv->domainSecurityVerify(mgr, def);