HomeClusterLabs Projects

Low: crmd: avoid use-after-free when disconnecting from CIB

Description

Low: crmd: avoid use-after-free when disconnecting from CIB

crmd_exit() freed the CIB connection, then drained the mainloop.
However, the mainloop could call functions (such as do_cib_control() or
cib_native_destroy()) that would use the connection object.

This would lead to a segfault, though the harm was minimal, since the crmd was
already exiting at this point.

Also log a notice comparable to what's done for the crmd's other disconnects.

Details

Provenance
kgaillotAuthored on Apr 21 2017, 12:31 PM
Parents
rP33b3b7e7004e: Refactor: libcib: functionize destroying op callback table
Branches
Unknown
Tags
Unknown

Event Timeline