Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check VMGroupRole in VMGroupXML.cc #6692

Closed
3 tasks
sminux opened this issue Aug 11, 2024 · 1 comment
Closed
3 tasks

Check VMGroupRole in VMGroupXML.cc #6692

sminux opened this issue Aug 11, 2024 · 1 comment

Comments

@sminux
Copy link

sminux commented Aug 11, 2024

Description
Return value of a function 'VMGroupRoles::get' is dereferenced at VMGroupXML.cc:

VMGroupRole * r = roles.get(i);
const std::set<int>& vms = r->get_vms();

without checking for NULL, but it is usually checked for this function (4 of 5).
Like that:
VMGroupRole * r = roles.get(i);
if ( r == 0 )
{
continue;
}

Details

  • Affected Component: [e.g. Sunstone, Scheduler, or Storage]
  • Hypervisor: KVM
  • Version: 6.9.8 or development

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
sminux pushed a commit to sminux/one that referenced this issue Aug 11, 2024
Check VMGroupRole in Inter-role Anti-affinity rules
@sminux sminux mentioned this issue Aug 11, 2024
2 tasks
@rsmontero rsmontero added this to the Release 6.10.1 milestone Sep 3, 2024
rsmontero pushed a commit that referenced this issue Sep 5, 2024
Add a check before dereferencing the group roles pointer.

(cherry picked from commit 48bab98)
@rsmontero
Copy link
Member

Merged in 1607b4a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants