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

nanny: fix use-after-free in debug mode (bsc#1206447) #945

Merged
merged 1 commit into from Jan 24, 2023

Conversation

mtomaschewski
Copy link
Member

Fix a use-after-free by getting a local mpolicy->fsm_policy reference in unregister_managed_policy to safely access the fsm policy name for a debug message logged after unregistering the mpolicy object, which is freeing the mpolicy (if it's the last reference).

A policy deletion is performed by wicked ifdown or ifreload and the execution is limited to root (uid 0) callers, so it does not bring additional privilege possibilities.

Fix a use-after-free by getting a local mpolicy->fsm_policy reference
in unregister_managed_policy to safely access the fsm policy name for
a debug message logged after unregistering the mpolicy object, which
is freeing the mpolicy (if it's the last reference).

A policy deletion is performed by wicked ifdown or ifreload and the
execution is limited to root (uid 0) callers, so it does not bring
additional privilege possibilities.
Copy link
Collaborator

@cfconrad cfconrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cfconrad cfconrad merged commit 2ce1be9 into openSUSE:master Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants