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

Exclude exe_running_docker_save in the "Set Setuid or Setgid bit" rule #946

Merged
merged 1 commit into from
Dec 2, 2019
Merged

Exclude exe_running_docker_save in the "Set Setuid or Setgid bit" rule #946

merged 1 commit into from
Dec 2, 2019

Conversation

JPLachance
Copy link
Contributor

@JPLachance JPLachance commented Dec 2, 2019

What type of PR is this?
/kind bug
/kind rule-update

Any specific area of the project related to this PR?
/area rules

What this PR does / why we need it:
Since the upgrade to Falco 0.18.0, the "Set Setuid or Setgid bit" rule is enabled. That rule reports false positives each time we run a container. For example:

{
    "rule": "Set Setuid or Setgid bit",
    "output": "2019-12-02T21:45:32.802828386+0000: Notice Setuid or setgid bit is set via chmod (fd=<NA> filename=/home/appuser mode=S_IXOTH|S_IROTH|S_IXGRP|S_IRGRP|S_IXUSR|S_IWUSR|S_IRUSR|S_ISGID user=root process=exe command=exe /var/lib/docker/overlay2/d06cc577802ae17ab015005a43d1370a3fdc039af0948cc05d0909e9a4404845/diff container_id=host container_name=host image=<NA>:<NA>) k8s.ns=<NA> k8s.pod=<NA> container=host k8s.ns=<NA> k8s.pod=<NA> container=host",
    "priority": "Notice",
    "output_fields": {
      "user.name": "root",
      "proc.name": "exe",
      "container.id": "host",
      "proc.cmdline": "exe /var/lib/docker/overlay2/d06cc577802ae17ab015005a43d1370a3fdc039af0948cc05d0909e9a4404845/diff",
      "evt.arg.mode": "S_IXOTH|S_IROTH|S_IXGRP|S_IRGRP|S_IXUSR|S_IWUSR|S_IRUSR|S_ISGID",
      "container.name": "host",
      "evt.arg.filename": "/home/appuser",
      "evt.time.iso8601": 1575323132802828300
    }
  }

This event is surrounded by dozens like it every time we start a container.

Adding a simple and not exe_running_docker_save fixes the issue.

Which issue(s) this PR fixes:
I did not file an issue, here is the PR instead!

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

rules(Set Setuid or Setgid bit): fixed a false positive by excluding "exe_running_docker_save"

Signed-off-by: Jean-Philippe Lachance <jplachance@coveo.com>
@Kaizhe
Copy link
Contributor

Kaizhe commented Dec 2, 2019

/lgtm

@poiana
Copy link
Contributor

poiana commented Dec 2, 2019

LGTM label has been added.

Git tree hash: f069d9b9591d8ccb16d626061c2fcc9640a1182b

@poiana poiana added the approved label Dec 2, 2019
@poiana
Copy link
Contributor

poiana commented Dec 2, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fntlnz, Kaizhe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fntlnz
Copy link
Contributor

fntlnz commented Dec 2, 2019

Thanks @JPLachance !

@fntlnz fntlnz merged commit 79cb75d into falcosecurity:dev Dec 2, 2019
@fntlnz fntlnz added this to the 0.19.0 milestone Dec 2, 2019
@JPLachance JPLachance deleted the fix-exe-docker-save-set-uid-gid branch December 3, 2019 14:52
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.

4 participants