Skip to content

[release/1.2] Revert "bump libseccomp-golang v0.9.1"#3538

Merged
dmcgowan merged 1 commit intocontainerd:release/1.2from
thaJeztah:1.2_revert_bump_libseccomp
Aug 15, 2019
Merged

[release/1.2] Revert "bump libseccomp-golang v0.9.1"#3538
dmcgowan merged 1 commit intocontainerd:release/1.2from
thaJeztah:1.2_revert_bump_libseccomp

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

This reverts commit d8f4da4 (#3376), which was a backport of #3371

Per the discussion on #3371 (comment), this bump caused the minimum supported seccomp version to be changed from 2.3.0, which caused older distros to no longer be supported.

Note that the fix for CVE-2017-18367 was already in the version we vendored before the bump (and the actual issue is in RunC; RunC 1.0.0-rc8 has the fix in place already.

This reverts commit d8f4da4.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah changed the title Revert "bump libseccomp-golang v0.9.1" [release/1.2] Revert "bump libseccomp-golang v0.9.1" Aug 15, 2019
@thaJeztah
Copy link
Copy Markdown
Member Author

ping @Random-Liu @justincormack PTAL

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #3538 into release/1.2 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           release/1.2    #3538   +/-   ##
============================================
  Coverage        43.66%   43.66%           
============================================
  Files              101      101           
  Lines            10816    10816           
============================================
  Hits              4723     4723           
  Misses            5357     5357           
  Partials           736      736
Flag Coverage Δ
#linux 47.25% <ø> (ø) ⬆️
#windows 40.78% <ø> (ø) ⬆️

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 eed8acd...8c0ec3c. Read the comment docs.

1 similar comment
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #3538 into release/1.2 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           release/1.2    #3538   +/-   ##
============================================
  Coverage        43.66%   43.66%           
============================================
  Files              101      101           
  Lines            10816    10816           
============================================
  Hits              4723     4723           
  Misses            5357     5357           
  Partials           736      736
Flag Coverage Δ
#linux 47.25% <ø> (ø) ⬆️
#windows 40.78% <ø> (ø) ⬆️

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 eed8acd...8c0ec3c. Read the comment docs.

@thaJeztah
Copy link
Copy Markdown
Member Author

thaJeztah commented Aug 15, 2019

From the runc libseccomp bump; opencontainers/runc#2074 (comment)

Looks like the fix for the CVE was already merged in opencontainers/runc@03a5a74#diff-c1eca12d097b318b217f891966083c8e as part of opencontainers/runc#1424

The "diff" posted in this PR looks to be between the wrong commits; this is the right link/diff:

seccomp/libseccomp-golang@84e90a9...v0.9.1

The fix is in opencontainers/runc@03a5a74#diff-c1eca12d097b318b217f891966083c8e).

The fix in libseccomp is in commit seccomp/libseccomp-golang@06e7a29

Full diff of libseccomp-golang changes in that runc PR: seccomp/libseccomp-golang@32f571b...84e90a9

@estesp estesp added this to the 1.2.8 milestone Aug 15, 2019
@Random-Liu
Copy link
Copy Markdown
Member

Random-Liu commented Aug 15, 2019

@thaJeztah So runc would still need libseccomp 2.3.0+?

That is fine for us, just make it clear, so that others may want to know about it. :)

@thaJeztah
Copy link
Copy Markdown
Member Author

@thaJeztah So runc would still need libseccomp 2.3.0+?

Current runc master yes, so it could be that at some point we have to raise the minimum requirement, but at least this should bring some time.

I think we should have a look if that can be fixed; haven't looked into it in-depth, but if the offending commit is indeed seccomp/libseccomp-golang@9814e55, then (from the description), it looks like it's only an optimisation that causes the dependency on the newer version; perhaps someone is able to provide a fix upstream to make sure older versions still work?

The code seems to suggest that the seccomp_version should only be used on seccomp 2.3 and above, but perhaps there's a bug?

https://github.com/seccomp/libseccomp-golang/blob/9814e55a2e59df39b8ad4fbff1226585ebb84674/seccomp_internal.go#L123-L138

#if SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR >= 3
unsigned int get_major_version()
{
       return seccomp_version()->major;
}
unsigned int get_minor_version()
{
       return seccomp_version()->minor;
}
unsigned int get_micro_version()
{
       return seccomp_version()->micro;
}
#else

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

1 similar comment
@dmcgowan
Copy link
Copy Markdown
Member

LGTM

@dmcgowan dmcgowan merged commit c5bca64 into containerd:release/1.2 Aug 15, 2019
@thaJeztah thaJeztah deleted the 1.2_revert_bump_libseccomp branch August 15, 2019 20:42
@Random-Liu
Copy link
Copy Markdown
Member

Random-Liu commented Aug 16, 2019

@thaJeztah I guess that might be decided at compile time?

So maybe we just need to make sure libseccomp version at built time matches runtime?

It seems that in our CI environment, libseccomp2 was 2.3.1 at compile time, but was 2.2.x at runtime before updating the image kubernetes/test-infra#13639

@thaJeztah
Copy link
Copy Markdown
Member Author

@thaJeztah I guess that might be decided at compile time?

🤦‍♂ yes, of course, I wasn't thinking; that makes sense

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.

6 participants