Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yara : avoid scanning special files that could hang #5971

Merged
merged 11 commits into from
Nov 12, 2019

Conversation

packetzero
Copy link
Contributor

There are some types of files that should not be scanned by YARA:

  • device special files
  • blocking pipes
  • osquery database LOCK files

Imagine for example that someone does the following query. Bad things can happen.
SELECT pid,path,yara.* FROM process_open_files LEFT JOIN yara USING (path) WHERE sig_group='myrules'

osquery/tables/yara/yara.cpp Outdated Show resolved Hide resolved
osquery/tables/yara/yara.cpp Outdated Show resolved Hide resolved
osquery/tables/yara/yara.cpp Outdated Show resolved Hide resolved
osquery/tables/yara/yara_utils.cpp Outdated Show resolved Hide resolved
osquery/tables/yara/tests/yara_tests.cpp Outdated Show resolved Hide resolved
osquery/tables/yara/tests/yara_tests.cpp Outdated Show resolved Hide resolved
theopolis
theopolis previously approved these changes Nov 11, 2019
@theopolis
Copy link
Member

I would still like to understand why we need to skip the RocksDB LOCK file. What about this file requires the skipping? There have to be other like-files warranting understanding-- is it an attribute such as open-exclusive/etc.

@theopolis theopolis merged commit b2e4869 into osquery:master Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants