dev-sec / dev-sec/linux-baseline

Timeout issue with NFS mounts - Don't transverse file system

Open
#78 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
875
Forks
193
Avg merge
9m
Merged PRs (30d)
1

Description

We are seeing timeout issues on control os-06 https://github.com/dev-sec/linux-baseline/blob/60ae1a5723bca01a9f87b846ede3f8b23a7bd0ed/controls/os_spec.rb#L180 when transversing the file system hits an NFS mount. The result is a timeout error of mixlibshellout exceeding 600s.

[2017-08-09T03:35:28+00:00] ERROR: Report handler Chef::Handler::AuditReport raised #<Mixlib::ShellOut::CommandTimeout: Command timed out after 600s:
Command exceeded allowed execution time, process terminated
---- Begin output of find / -perm -4000 -o -perm -2000 -type f ! -path '/proc/*' ! -path '/var/lib/lxd/containers/*' -print 2>/dev/null | grep -v '^find:' ----
STDOUT:
STDERR:
---- End output of find / -perm -4000 -o -perm -2000 -type f ! -path '/proc/*' ! -path '/var/lib/lxd/containers/*' -print 2>/dev/null | grep -v '^find:' ----
Ran find / -perm -4000 -o -perm -2000 -type f ! -path '/proc/*' ! -path '/var/lib/lxd/containers/*' -print 2>/dev/null | grep -v '^find:' returned >

Is there a better way to do this control?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with control os_spec.rb around line 180 and inspect the find command shown in the timeout output. Reproduce or examine how the control traverses the filesystem, then define completion as checking the intended files without timing out when an NFS mount is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, ruby, shell
Domain
operating-systems, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.