Skip to content

snap-confine, snap-seccomp: utilize new seccomp logging features - 2.32#4803

Merged
mvo5 merged 6 commits intocanonical:release/2.32from
jdstrand:seccomp-logging-2.32
Mar 14, 2018
Merged

snap-confine, snap-seccomp: utilize new seccomp logging features - 2.32#4803
mvo5 merged 6 commits intocanonical:release/2.32from
jdstrand:seccomp-logging-2.32

Conversation

@jdstrand
Copy link

@jdstrand jdstrand commented Mar 8, 2018

#3998 for 2.32

tyhicks and others added 2 commits March 8, 2018 13:22
…onical#3998)

* snap-confine, snap-seccomp: Default to SECCOMP_RET_ERRNO

The seccomp policy has historically used SECCOMP_RET_KILL to forcefully
kill a snap process that bumps into the walls of the sandbox. However,
killing the snap is not very user friendly. Changing the policy to use
SECCOMP_RET_ERRNO to return -1 with errno set to EPERM has been desired
but the kernel would not log those denials which could leave users and
developers confused about why their applications were experiencing
errors.

The 4.14 Linux kernel contains new seccomp logging controls which allows
snapd to request SECCOMP_RET_ERRNO to be logged. This patch makes use of
the new logging controls and switches the default action of the seccomp
policy to SECCOMP_RET_ERRNO so that snaps aren't killed when the perform
an illegal system call.

Signed-off-by: Tyler Hicks <[email protected]>
@jdstrand jdstrand added this to the 2.32 milestone Mar 8, 2018
"path": "github.com/mvo5/libseccomp-golang",
"revision": "84e1d1c75beaa58be6a76d2fc94d95eb8c1583b6",
"revisionTime": "2017-06-14T13:46:31Z"
"revision": "e0e036d8f7d25f0c63e96896b99547e9d5f71617",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs an update to the latest https://github.com/mvo5/libseccomp-golang/commits/master (f4de83b52afb3c19190eb65cc92429feaaf0e8b6) ?

@mvo5
Copy link
Contributor

mvo5 commented Mar 9, 2018

We will need #4807 to make tests pass again on 2.32 (which is currently broken because of too much cherry-picking :/

@jdstrand
Copy link
Author

jdstrand commented Mar 9, 2018

Thank you for adjusting vendor/vendor.json! I went to do it now and it was already done.

@codecov-io
Copy link

Codecov Report

Merging #4803 into release/2.32 will increase coverage by 0.02%.
The diff coverage is 89.83%.

Impacted file tree graph

@@               Coverage Diff                @@
##           release/2.32    #4803      +/-   ##
================================================
+ Coverage         78.61%   78.64%   +0.02%     
================================================
  Files               470      471       +1     
  Lines             33877    33919      +42     
================================================
+ Hits              26632    26674      +42     
- Misses             5079     5081       +2     
+ Partials           2166     2164       -2
Impacted Files Coverage Δ
interfaces/system_key.go 63.63% <100%> (+1.13%) ⬆️
interfaces/seccomp/backend.go 76.38% <100%> (+0.67%) ⬆️
release/seccomp.go 84.21% <84.21%> (ø)
cmd/snap-seccomp/main.go 58.96% <91.89%> (+5.83%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb05e2f...ffd2c35. Read the comment docs.

@mvo5 mvo5 merged commit 5612547 into canonical:release/2.32 Mar 14, 2018
@jdstrand jdstrand deleted the seccomp-logging-2.32 branch May 17, 2018 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants