Giter Club home page Giter Club logo

Comments (13)

hillu avatar hillu commented on May 22, 2024

Can you reproduce the crash every time, given the same sample and ruleset?

from go-yara.

PimmyTrousers avatar PimmyTrousers commented on May 22, 2024

yes I can reproduce it every time and interesting so, its exactly this everytime [signal SIGSEGV: segmentation violation code=0x1 addr=0x2f pc=0xcd3e97]

from go-yara.

hillu avatar hillu commented on May 22, 2024

Great! Can you strip down the application you deploy using Docker into something I could use for trying to reproduce the issue? Also, I'd need access to the sample. (Putting it into an encrypted ZIP file and attaching it to the issue might work.)

from go-yara.

PimmyTrousers avatar PimmyTrousers commented on May 22, 2024

Yup ill create a recreatable dockerfile and post it here!

from go-yara.

PimmyTrousers avatar PimmyTrousers commented on May 22, 2024

Hello again! Created a repo to replicate the issue I'm seeing. If you have any questions lemme know https://github.com/PimmyTrousers/DockerYaraMock

from go-yara.

hillu avatar hillu commented on May 22, 2024

Thanks.

from go-yara.

botherder avatar botherder commented on May 22, 2024

FWIW, I've been having the same issue (contacted @hillu over email about it).
I am not running the Yara scanner in a docker container, and it also crashes in the same place with a rather large ruleset.

from go-yara.

PimmyTrousers avatar PimmyTrousers commented on May 22, 2024

@hillu I believe I have a fix for this. #57

from go-yara.

hillu avatar hillu commented on May 22, 2024

@PimmyTrousers I believe that your build setup might be to blame for the crash. I noticed that you install libyara-dev which pulls in the libyara3 shared library package. If libyara-dev is replaced by the packages that are needed to build the Debian yara package, the problem goes away.

There are two other things that my PR (PimmyTrousers/DockerYaraMock#1) does:

  1. Run ldconfig after make install otherwise yarac cannot be run.
  2. Run configure with the same parameters as is done in the Debian yara package; otherwise the ruleset cannot be compiled because it relies on modules that have to be enable explicitly.

Both steps indicate that libyara.so.3 from the distribution was used previously.

from go-yara.

hillu avatar hillu commented on May 22, 2024

@PimmyTrousers Ping? Can I close this issue?

from go-yara.

PimmyTrousers avatar PimmyTrousers commented on May 22, 2024

Yes we can close the issue. You were right. You're fix was correct :) Thanks for the fix!

from go-yara.

botherder avatar botherder commented on May 22, 2024

@hillu Is there any way to avoid this issue, without either compiling directly on the production server or using a statically linked binary?
Would compiling with the same version as the libyara3 installed on the production server work?

from go-yara.

hillu avatar hillu commented on May 22, 2024

@botherder Compiling with the same libyara3 version should work.

from go-yara.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.