Bad dhcpcd PID lookup makes Network Manager go on a killing spree.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/dhcp/nm-dhcp-dhcpcd.c#L165 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/dhcp/nm-dhcp-client.c#L89
As you can see in the first function, when stopping dhcpcd Network Manager looks up its PID and then sends a signal to it. Straightforward enough.
But look at the definition of that lookup function. If, for any reason, it can't find the correct dhcpcd instance, it returns -1.
That -1 gets passed straight to the call to kill.
Kill interprets a request to kill pid -1 to mean that it should murder every process it can get its grubby little mitts on with the exception of init...
This is... not good...
Make it check that the pid is not -1 before attempting to send the signal.
I can provide you with a patch if you really need one, but getting my employer to approve releasing code to the public isn't really worth the paperwork for a one-if-statement fix.