snoopy icon indicating copy to clipboard operation
snoopy copied to clipboard

Loading dynamic libraries causes core dump

Open wzyhay opened this issue 6 months ago • 0 comments

Checklist before starting to submit this bug report

I confirm that:

  • [X] I am submitting a bug report! :)
  • [X] I have tested this with the latest stable Snoopy version (or the latest master build).
  • [X] I have checked the FAQ.
  • [X] I have read Snoopy's documentation here and here.
  • [] I have searched Snoopy issues for an existing issue that matches my problem, and found none.

Bug description

I compiled the code into a dynamic library file locally and loaded the dynamic library through the cp command, but a segmentation error occurred when I used this command for the second time. BossHi-20240806140831 BossHi-20240806140823 When something went wrong, there were disastrous consequences:

BossHi-20240806150834 BossHi-20240806150841

Bug reproduction steps

My debugging command is as follows: strace \cp -pf /root/hids-wazuh_agent4.3.8_0.4.1_0731/tools/snoopy/libsnoopy.so* /usr/local/lib/ BossHi-20240806150825

I think the cp command caused the so file to be truncated. I want to know how to ensure that replacing the so file is a safe operation in this environment where the process cannot be stopped and restarted. BossHi-20240806150802

Expected result

<FILLIN>

Actual result

<FILLIN>

wzyhay avatar Aug 06 '24 06:08 wzyhay