Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1000)

Side by Side Diff: content/common/sandbox_linux/bpf_renderer_policy_linux.cc

Issue 2536103002: Linux Sandbox: Whitelist prlimit64 when used as getrlimit (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/sandbox_linux/bpf_renderer_policy_linux.h" 5 #include "content/common/sandbox_linux/bpf_renderer_policy_linux.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <sys/ioctl.h> 8 #include <sys/ioctl.h>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 case __NR_sysinfo: 81 case __NR_sysinfo:
82 case __NR_times: 82 case __NR_times:
83 case __NR_uname: 83 case __NR_uname:
84 return Allow(); 84 return Allow();
85 case __NR_sched_getaffinity: 85 case __NR_sched_getaffinity:
86 case __NR_sched_getparam: 86 case __NR_sched_getparam:
87 case __NR_sched_getscheduler: 87 case __NR_sched_getscheduler:
88 case __NR_sched_setscheduler: 88 case __NR_sched_setscheduler:
89 return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno); 89 return sandbox::RestrictSchedTarget(GetPolicyPid(), sysno);
90 case __NR_prlimit64: 90 case __NR_prlimit64:
91 return Error(EPERM); // See crbug.com/160157. 91 // See crbug.com/662450.
92 return sandbox::RestrictPrlimitToGetrlimit(GetPolicyPid());
92 default: 93 default:
93 // Default on the content baseline policy. 94 // Default on the content baseline policy.
94 return SandboxBPFBasePolicy::EvaluateSyscall(sysno); 95 return SandboxBPFBasePolicy::EvaluateSyscall(sysno);
95 } 96 }
96 } 97 }
97 98
98 } // namespace content 99 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698