HomeClusterLabs Projects

Fix: pacemaker-attrd,libcrmcluster: avoid use-after-free when remote node in…

Description

Fix: pacemaker-attrd,libcrmcluster: avoid use-after-free when remote node in cluster node cache

Previously, pacemaker-attrd removed any conflicting entry from the cluster node
cache before adding a node to the remote node cache. However, if the name used
was a pointer into the cluster node cache entry being freed, it would be reused
to create the remote node cache entry.

This avoids that and also moves the functionality into libcrmcluster for better
isolation of cache management. It also corrects mistakenly setting errno to a
negative value.

Details

Provenance
kgaillotAuthored on Dec 14 2023, 10:51 AM
Parents
rP14a7449a413f: Refactor: libcrmcluster,attrd: functionize removing node from both caches
Branches
Unknown
Tags
Unknown