Skip to content

Commit

Permalink
seccomp: Allow personality with UNAME26 bit set.
Browse files Browse the repository at this point in the history
From personality(2):

    Have uname(2) report a 2.6.40+ version number rather than a 3.x version
    number.  Added as a stopgap measure to support broken applications that
    could not handle the  kernel  version-numbering  switch  from 2.6.x to 3.x.

This allows both "UNAME26|PER_LINUX" and "UNAME26|PER_LINUX32".

Fixes: moby#32839

Signed-off-by: Ian Campbell <[email protected]>
  • Loading branch information
Ian Campbell committed May 2, 2017
1 parent 1d0b921 commit cd45643
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
34 changes: 34 additions & 0 deletions profiles/seccomp/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,40 @@
"includes": {},
"excludes": {}
},
{
"names": [
"personality"
],
"action": "SCMP_ACT_ALLOW",
"args": [
{
"index": 0,
"value": 131072,
"valueTwo": 0,
"op": "SCMP_CMP_EQ"
}
],
"comment": "",
"includes": {},
"excludes": {}
},
{
"names": [
"personality"
],
"action": "SCMP_ACT_ALLOW",
"args": [
{
"index": 0,
"value": 131080,
"valueTwo": 0,
"op": "SCMP_CMP_EQ"
}
],
"comment": "",
"includes": {},
"excludes": {}
},
{
"names": [
"personality"
Expand Down
22 changes: 22 additions & 0 deletions profiles/seccomp/seccomp_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,28 @@ func DefaultProfile() *types.Seccomp {
},
},
},
{
Names: []string{"personality"},
Action: types.ActAllow,
Args: []*types.Arg{
{
Index: 0,
Value: 0x20000,
Op: types.OpEqualTo,
},
},
},
{
Names: []string{"personality"},
Action: types.ActAllow,
Args: []*types.Arg{
{
Index: 0,
Value: 0x20008,
Op: types.OpEqualTo,
},
},
},
{
Names: []string{"personality"},
Action: types.ActAllow,
Expand Down

0 comments on commit cd45643

Please sign in to comment.