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

Fix: libstonithd: avoid use-after-free when retrieving metadata of Linux-HA fence agents #3476

Merged

Conversation

gao-yan
Copy link
Member

@gao-yan gao-yan commented May 28, 2024

Regression introduced by acfbd5e (not yet released).

A st_info_fn() may free any existing output buffer every time when it's called like:

https://github.com/ClusterLabs/cluster-glue/blob/5cc622b4/lib/plugins/stonith/external.c#L612

So we should copy the output every time.

…nux-HA fence agents

Regression introduced by acfbd5e (not yet released).

A st_info_fn() may free any existing output buffer every time when it's
called like:

https://github.com/ClusterLabs/cluster-glue/blob/5cc622b4/lib/plugins/stonith/external.c#L612

So we should copy the output every time.
Copy link
Contributor

@kgaillot kgaillot left a comment

Choose a reason for hiding this comment

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

ouch, thanks

lib/fencing/st_lha.c Show resolved Hide resolved
lib/fencing/st_lha.c Show resolved Hide resolved
@kgaillot kgaillot merged commit 62327f5 into ClusterLabs:main May 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants