| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2026-06-05 06:42+0200\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
|
| 19 |
#. type: TH |
| 20 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 21 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 22 |
#, no-wrap |
| 23 |
msgid "seccomp" |
| 24 |
msgstr "" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 28 |
#: opensuse-tumbleweed |
| 29 |
#, no-wrap |
| 30 |
msgid "2026-02-10" |
| 31 |
msgstr "" |
| 32 |
|
| 33 |
#. type: TH |
| 34 |
#: archlinux debian-unstable |
| 35 |
#, no-wrap |
| 36 |
msgid "Linux man-pages 6.18" |
| 37 |
msgstr "" |
| 38 |
|
| 39 |
#. type: SH |
| 40 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 41 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 42 |
#, no-wrap |
| 43 |
msgid "NAME" |
| 44 |
msgstr "" |
| 45 |
|
| 46 |
#. type: Plain text |
| 47 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 48 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 49 |
msgid "seccomp - operate on Secure Computing state of the process" |
| 50 |
msgstr "" |
| 51 |
|
| 52 |
#. type: SH |
| 53 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 54 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 55 |
#, no-wrap |
| 56 |
msgid "LIBRARY" |
| 57 |
msgstr "" |
| 58 |
|
| 59 |
#. type: Plain text |
| 60 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 61 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 62 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 63 |
msgstr "" |
| 64 |
|
| 65 |
#. type: SH |
| 66 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 67 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 68 |
#, no-wrap |
| 69 |
msgid "SYNOPSIS" |
| 70 |
msgstr "" |
| 71 |
|
| 72 |
#. Kees Cook noted: Anything that uses SECCOMP_RET_TRACE returns will |
| 73 |
#. need <sys/ptrace.h> |
| 74 |
#. type: Plain text |
| 75 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 76 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 77 |
#, no-wrap |
| 78 |
msgid "" |
| 79 |
"B<#include E<lt>linux/seccomp.hE<gt>> /* Definition of B<SECCOMP_*> constants */\n" |
| 80 |
"B<#include E<lt>linux/filter.hE<gt>> /* Definition of B<struct sock_fprog> */\n" |
| 81 |
"B<#include E<lt>linux/audit.hE<gt>> /* Definition of B<AUDIT_*> constants */\n" |
| 82 |
"B<#include E<lt>linux/signal.hE<gt>> /* Definition of B<SIG*> constants */\n" |
| 83 |
"B<#include E<lt>sys/ptrace.hE<gt>> /* Definition of B<PTRACE_*> constants */\n" |
| 84 |
"B<#include E<lt>sys/syscall.hE<gt>> /* Definition of B<SYS_*> constants */\n" |
| 85 |
"B<#include E<lt>unistd.hE<gt>>\n" |
| 86 |
msgstr "" |
| 87 |
|
| 88 |
#. type: Plain text |
| 89 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 90 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 91 |
#, no-wrap |
| 92 |
msgid "" |
| 93 |
"B<int syscall(SYS_seccomp, unsigned int >I<operation>B<, unsigned int >I<flags>B<,>\n" |
| 94 |
"B< void *>I<args>B<);>\n" |
| 95 |
msgstr "" |
| 96 |
|
| 97 |
#. type: Plain text |
| 98 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 99 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 100 |
msgid "" |
| 101 |
"I<Note>: glibc provides no wrapper for B<seccomp>(), necessitating the use " |
| 102 |
"of B<syscall>(2)." |
| 103 |
msgstr "" |
| 104 |
|
| 105 |
#. type: SH |
| 106 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 107 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 108 |
#, no-wrap |
| 109 |
msgid "DESCRIPTION" |
| 110 |
msgstr "" |
| 111 |
|
| 112 |
#. type: Plain text |
| 113 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 114 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 115 |
msgid "" |
| 116 |
"The B<seccomp>() system call operates on the Secure Computing (seccomp) " |
| 117 |
"state of the calling process." |
| 118 |
msgstr "" |
| 119 |
|
| 120 |
#. type: Plain text |
| 121 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 122 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 123 |
msgid "Currently, Linux supports the following I<operation> values:" |
| 124 |
msgstr "" |
| 125 |
|
| 126 |
#. type: TP |
| 127 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 128 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 129 |
#, no-wrap |
| 130 |
msgid "B<SECCOMP_SET_MODE_STRICT>" |
| 131 |
msgstr "" |
| 132 |
|
| 133 |
#. type: Plain text |
| 134 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 135 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 136 |
msgid "" |
| 137 |
"The only system calls that the calling thread is permitted to make are " |
| 138 |
"B<read>(2), B<write>(2), B<_exit>(2) (but not B<exit_group>(2)), and " |
| 139 |
"B<sigreturn>(2). Other system calls result in the termination of the " |
| 140 |
"calling thread, or termination of the entire process with the B<SIGKILL> " |
| 141 |
"signal when there is only one thread. Strict secure computing mode is " |
| 142 |
"useful for number-crunching applications that may need to execute untrusted " |
| 143 |
"byte code, perhaps obtained by reading from a pipe or socket." |
| 144 |
msgstr "" |
| 145 |
|
| 146 |
#. type: Plain text |
| 147 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 148 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 149 |
msgid "" |
| 150 |
"Note that although the calling thread can no longer call B<sigprocmask>(2), " |
| 151 |
"it can use B<sigreturn>(2) to block all signals apart from B<SIGKILL> and " |
| 152 |
"B<SIGSTOP>. This means that B<alarm>(2) (for example) is not sufficient " |
| 153 |
"for restricting the process's execution time. Instead, to reliably " |
| 154 |
"terminate the process, B<SIGKILL> must be used. This can be done by using " |
| 155 |
"B<timer_create>(2) with B<SIGEV_SIGNAL> and I<sigev_signo> set to " |
| 156 |
"B<SIGKILL>, or by using B<setrlimit>(2) to set the hard limit for " |
| 157 |
"B<RLIMIT_CPU>." |
| 158 |
msgstr "" |
| 159 |
|
| 160 |
#. type: Plain text |
| 161 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 162 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 163 |
msgid "" |
| 164 |
"This operation is available only if the kernel is configured with " |
| 165 |
"B<CONFIG_SECCOMP> enabled." |
| 166 |
msgstr "" |
| 167 |
|
| 168 |
#. type: Plain text |
| 169 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 170 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 171 |
msgid "The value of I<flags> must be 0, and I<args> must be NULL." |
| 172 |
msgstr "" |
| 173 |
|
| 174 |
#. type: Plain text |
| 175 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 176 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 177 |
msgid "This operation is functionally identical to the call:" |
| 178 |
msgstr "" |
| 179 |
|
| 180 |
#. type: Plain text |
| 181 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 182 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 183 |
#, no-wrap |
| 184 |
msgid "prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT);\n" |
| 185 |
msgstr "" |
| 186 |
|
| 187 |
#. type: TP |
| 188 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 189 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 190 |
#, no-wrap |
| 191 |
msgid "B<SECCOMP_SET_MODE_FILTER>" |
| 192 |
msgstr "" |
| 193 |
|
| 194 |
#. type: Plain text |
| 195 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 196 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 197 |
msgid "" |
| 198 |
"The system calls allowed are defined by a pointer to a Berkeley Packet " |
| 199 |
"Filter (BPF) passed via I<args>. This argument is a pointer to a I<struct\\ " |
| 200 |
"sock_fprog>; it can be designed to filter arbitrary system calls and system " |
| 201 |
"call arguments. If the filter is invalid, B<seccomp>() fails, returning " |
| 202 |
"B<EINVAL> in I<errno>." |
| 203 |
msgstr "" |
| 204 |
|
| 205 |
#. type: Plain text |
| 206 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 207 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 208 |
msgid "" |
| 209 |
"If B<fork>(2) or B<clone>(2) is allowed by the filter, any child processes " |
| 210 |
"will be constrained to the same system call filters as the parent. If " |
| 211 |
"B<execve>(2) is allowed, the existing filters will be preserved across a " |
| 212 |
"call to B<execve>(2)." |
| 213 |
msgstr "" |
| 214 |
|
| 215 |
#. type: Plain text |
| 216 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 217 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 218 |
msgid "" |
| 219 |
"In order to use the B<SECCOMP_SET_MODE_FILTER> operation, either the calling " |
| 220 |
"thread must have the B<CAP_SYS_ADMIN> capability in its user namespace, or " |
| 221 |
"the thread must already have the I<no_new_privs> bit set. If that bit was " |
| 222 |
"not already set by an ancestor of this thread, the thread must make the " |
| 223 |
"following call:" |
| 224 |
msgstr "" |
| 225 |
|
| 226 |
#. type: Plain text |
| 227 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 228 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 229 |
#, no-wrap |
| 230 |
msgid "prctl(PR_SET_NO_NEW_PRIVS, 1);\n" |
| 231 |
msgstr "" |
| 232 |
|
| 233 |
#. type: Plain text |
| 234 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 235 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 236 |
msgid "" |
| 237 |
"Otherwise, the B<SECCOMP_SET_MODE_FILTER> operation fails and returns " |
| 238 |
"B<EACCES> in I<errno>. This requirement ensures that an unprivileged " |
| 239 |
"process cannot apply a malicious filter and then invoke a set-user-ID or " |
| 240 |
"other privileged program using B<execve>(2), thus potentially compromising " |
| 241 |
"that program. (Such a malicious filter might, for example, cause an attempt " |
| 242 |
"to use B<setuid>(2) to set the caller's user IDs to nonzero values to " |
| 243 |
"instead return 0 without actually making the system call. Thus, the program " |
| 244 |
"might be tricked into retaining superuser privileges in circumstances where " |
| 245 |
"it is possible to influence it to do dangerous things because it did not " |
| 246 |
"actually drop privileges.)" |
| 247 |
msgstr "" |
| 248 |
|
| 249 |
#. type: Plain text |
| 250 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 251 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 252 |
msgid "" |
| 253 |
"If B<prctl>(2) or B<seccomp>() is allowed by the attached filter, further " |
| 254 |
"filters may be added. This will increase evaluation time, but allows for " |
| 255 |
"further reduction of the attack surface during execution of a thread." |
| 256 |
msgstr "" |
| 257 |
|
| 258 |
#. type: Plain text |
| 259 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 260 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 261 |
msgid "" |
| 262 |
"The B<SECCOMP_SET_MODE_FILTER> operation is available only if the kernel is " |
| 263 |
"configured with B<CONFIG_SECCOMP_FILTER> enabled." |
| 264 |
msgstr "" |
| 265 |
|
| 266 |
#. type: Plain text |
| 267 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 268 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 269 |
msgid "" |
| 270 |
"When I<flags> is 0, this operation is functionally identical to the call:" |
| 271 |
msgstr "" |
| 272 |
|
| 273 |
#. type: Plain text |
| 274 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 275 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 276 |
#, no-wrap |
| 277 |
msgid "prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, args);\n" |
| 278 |
msgstr "" |
| 279 |
|
| 280 |
#. type: Plain text |
| 281 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 282 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 283 |
msgid "The recognized I<flags> are:" |
| 284 |
msgstr "" |
| 285 |
|
| 286 |
#. type: TP |
| 287 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 288 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 289 |
#, no-wrap |
| 290 |
msgid "B<SECCOMP_FILTER_FLAG_LOG> (since Linux 4.14)" |
| 291 |
msgstr "" |
| 292 |
|
| 293 |
#. commit e66a39977985b1e69e17c4042cb290768eca9b02 |
| 294 |
#. type: Plain text |
| 295 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 296 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 297 |
msgid "" |
| 298 |
"All filter return actions except B<SECCOMP_RET_ALLOW> should be logged. An " |
| 299 |
"administrator may override this filter flag by preventing specific actions " |
| 300 |
"from being logged via the I</proc/sys/kernel/seccomp/actions_logged> file." |
| 301 |
msgstr "" |
| 302 |
|
| 303 |
#. type: TP |
| 304 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 305 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 306 |
#, no-wrap |
| 307 |
msgid "B<SECCOMP_FILTER_FLAG_NEW_LISTENER> (since Linux 5.0)" |
| 308 |
msgstr "" |
| 309 |
|
| 310 |
#. commit 6a21cc50f0c7f87dae5259f6cfefe024412313f6 |
| 311 |
#. type: Plain text |
| 312 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 313 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 314 |
msgid "" |
| 315 |
"After successfully installing the filter program, return a new user-space " |
| 316 |
"notification file descriptor. (The close-on-exec flag is set for the file " |
| 317 |
"descriptor.) When the filter returns B<SECCOMP_RET_USER_NOTIF> a " |
| 318 |
"notification will be sent to this file descriptor." |
| 319 |
msgstr "" |
| 320 |
|
| 321 |
#. type: Plain text |
| 322 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 323 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 324 |
msgid "" |
| 325 |
"At most one seccomp filter using the B<SECCOMP_FILTER_FLAG_NEW_LISTENER> " |
| 326 |
"flag can be installed for a thread." |
| 327 |
msgstr "" |
| 328 |
|
| 329 |
#. type: Plain text |
| 330 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 331 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 332 |
msgid "See B<seccomp_unotify>(2) for further details." |
| 333 |
msgstr "" |
| 334 |
|
| 335 |
#. type: TP |
| 336 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 337 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 338 |
#, no-wrap |
| 339 |
msgid "B<SECCOMP_FILTER_FLAG_SPEC_ALLOW> (since Linux 4.17)" |
| 340 |
msgstr "" |
| 341 |
|
| 342 |
#. commit 00a02d0c502a06d15e07b857f8ff921e3e402675 |
| 343 |
#. type: Plain text |
| 344 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 345 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 346 |
msgid "Disable Speculative Store Bypass mitigation." |
| 347 |
msgstr "" |
| 348 |
|
| 349 |
#. type: TP |
| 350 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 351 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 352 |
#, no-wrap |
| 353 |
msgid "B<SECCOMP_FILTER_FLAG_TSYNC>" |
| 354 |
msgstr "" |
| 355 |
|
| 356 |
#. type: Plain text |
| 357 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 358 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 359 |
msgid "" |
| 360 |
"When adding a new filter, synchronize all other threads of the calling " |
| 361 |
"process to the same seccomp filter tree. A \"filter tree\" is the ordered " |
| 362 |
"list of filters attached to a thread. (Attaching identical filters in " |
| 363 |
"separate B<seccomp>() calls results in different filters from this " |
| 364 |
"perspective.)" |
| 365 |
msgstr "" |
| 366 |
|
| 367 |
#. type: Plain text |
| 368 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 369 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 370 |
msgid "" |
| 371 |
"If any thread cannot synchronize to the same filter tree, the call will not " |
| 372 |
"attach the new seccomp filter, and will fail, returning the first thread ID " |
| 373 |
"found that cannot synchronize. Synchronization will fail if another thread " |
| 374 |
"in the same process is in B<SECCOMP_MODE_STRICT> or if it has attached new " |
| 375 |
"seccomp filters to itself, diverging from the calling thread's filter tree." |
| 376 |
msgstr "" |
| 377 |
|
| 378 |
#. type: TP |
| 379 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 380 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 381 |
#, no-wrap |
| 382 |
msgid "B<SECCOMP_GET_ACTION_AVAIL> (since Linux 4.14)" |
| 383 |
msgstr "" |
| 384 |
|
| 385 |
#. commit d612b1fd8010d0d67b5287fe146b8b55bcbb8655 |
| 386 |
#. type: Plain text |
| 387 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 388 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 389 |
msgid "" |
| 390 |
"Test to see if an action is supported by the kernel. This operation is " |
| 391 |
"helpful to confirm that the kernel knows of a more recently added filter " |
| 392 |
"return action since the kernel treats all unknown actions as " |
| 393 |
"B<SECCOMP_RET_KILL_PROCESS>." |
| 394 |
msgstr "" |
| 395 |
|
| 396 |
#. type: Plain text |
| 397 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 398 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 399 |
msgid "" |
| 400 |
"The value of I<flags> must be 0, and I<args> must be a pointer to an " |
| 401 |
"unsigned 32-bit filter return action." |
| 402 |
msgstr "" |
| 403 |
|
| 404 |
#. type: TP |
| 405 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 406 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 407 |
#, no-wrap |
| 408 |
msgid "B<SECCOMP_GET_NOTIF_SIZES> (since Linux 5.0)" |
| 409 |
msgstr "" |
| 410 |
|
| 411 |
#. commit 6a21cc50f0c7f87dae5259f6cfefe024412313f6 |
| 412 |
#. type: Plain text |
| 413 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 414 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 415 |
msgid "" |
| 416 |
"Get the sizes of the seccomp user-space notification structures. Since " |
| 417 |
"these structures may evolve and grow over time, this command can be used to " |
| 418 |
"determine how much memory to allocate for sending and receiving " |
| 419 |
"notifications." |
| 420 |
msgstr "" |
| 421 |
|
| 422 |
#. type: Plain text |
| 423 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 424 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 425 |
msgid "" |
| 426 |
"The value of I<flags> must be 0, and I<args> must be a pointer to a I<struct " |
| 427 |
"seccomp_notif_sizes>, which has the following form:" |
| 428 |
msgstr "" |
| 429 |
|
| 430 |
#. type: Plain text |
| 431 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 432 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 433 |
#, no-wrap |
| 434 |
msgid "" |
| 435 |
"struct seccomp_notif_sizes\n" |
| 436 |
" __u16 seccomp_notif; /* Size of notification structure */\n" |
| 437 |
" __u16 seccomp_notif_resp; /* Size of response structure */\n" |
| 438 |
" __u16 seccomp_data; /* Size of \\[aq]struct seccomp_data\\[aq] */\n" |
| 439 |
"};\n" |
| 440 |
msgstr "" |
| 441 |
|
| 442 |
#. type: SS |
| 443 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 444 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 445 |
#, no-wrap |
| 446 |
msgid "Filters" |
| 447 |
msgstr "" |
| 448 |
|
| 449 |
#. type: Plain text |
| 450 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 451 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 452 |
msgid "" |
| 453 |
"When adding filters via B<SECCOMP_SET_MODE_FILTER>, I<args> points to a " |
| 454 |
"filter program:" |
| 455 |
msgstr "" |
| 456 |
|
| 457 |
#. type: Plain text |
| 458 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 459 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 460 |
#, no-wrap |
| 461 |
msgid "" |
| 462 |
"struct sock_fprog {\n" |
| 463 |
" unsigned short len; /* Number of BPF instructions */\n" |
| 464 |
" struct sock_filter *filter; /* Pointer to array of\n" |
| 465 |
" BPF instructions */\n" |
| 466 |
"};\n" |
| 467 |
msgstr "" |
| 468 |
|
| 469 |
#. type: Plain text |
| 470 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 471 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 472 |
msgid "Each program must contain one or more BPF instructions:" |
| 473 |
msgstr "" |
| 474 |
|
| 475 |
#. type: Plain text |
| 476 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 477 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 478 |
#, no-wrap |
| 479 |
msgid "" |
| 480 |
"struct sock_filter { /* Filter block */\n" |
| 481 |
" __u16 code; /* Actual filter code */\n" |
| 482 |
" __u8 jt; /* Jump true */\n" |
| 483 |
" __u8 jf; /* Jump false */\n" |
| 484 |
" __u32 k; /* Generic multiuse field */\n" |
| 485 |
"};\n" |
| 486 |
msgstr "" |
| 487 |
|
| 488 |
#. #-#-#-#-# archlinux: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 489 |
#. Quoting Kees Cook: |
| 490 |
#. If BPF even allows changing the data, it's not copied back to |
| 491 |
#. the syscall when it runs. Anything wanting to do things like |
| 492 |
#. that would need to use ptrace to catch the call and directly |
| 493 |
#. modify the registers before continuing with the call. |
| 494 |
#. type: Plain text |
| 495 |
#. #-#-#-#-# debian-trixie: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 496 |
#. Quoting Kees Cook: |
| 497 |
#. If BPF even allows changing the data, it's not copied back to |
| 498 |
#. the syscall when it runs. Anything wanting to do things like |
| 499 |
#. that would need to use ptrace to catch the call and directly |
| 500 |
#. modify the registers before continuing with the call. |
| 501 |
#. type: Plain text |
| 502 |
#. #-#-#-#-# debian-unstable: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 503 |
#. Quoting Kees Cook: |
| 504 |
#. If BPF even allows changing the data, it's not copied back to |
| 505 |
#. the syscall when it runs. Anything wanting to do things like |
| 506 |
#. that would need to use ptrace to catch the call and directly |
| 507 |
#. modify the registers before continuing with the call. |
| 508 |
#. type: Plain text |
| 509 |
#. #-#-#-#-# fedora-44: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 510 |
#. Quoting Kees Cook: |
| 511 |
#. If BPF even allows changing the data, it's not copied back to |
| 512 |
#. the syscall when it runs. Anything wanting to do things like |
| 513 |
#. that would need to use ptrace to catch the call and directly |
| 514 |
#. modify the registers before continuing with the call. |
| 515 |
#. type: Plain text |
| 516 |
#. #-#-#-#-# fedora-rawhide: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 517 |
#. Quoting Kees Cook: |
| 518 |
#. If BPF even allows changing the data, it's not copied back to |
| 519 |
#. the syscall when it runs. Anything wanting to do things like |
| 520 |
#. that would need to use ptrace to catch the call and directly |
| 521 |
#. modify the registers before continuing with the call. |
| 522 |
#. type: Plain text |
| 523 |
#. #-#-#-#-# mageia-cauldron: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 524 |
#. Quoting Kees Cook: |
| 525 |
#. If BPF even allows changing the data, it's not copied back to |
| 526 |
#. the syscall when it runs. Anything wanting to do things like |
| 527 |
#. that would need to use ptrace to catch the call and directly |
| 528 |
#. modify the registers before continuing with the call. |
| 529 |
#. type: Plain text |
| 530 |
#. #-#-#-#-# opensuse-leap-16-1: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 531 |
#. Quoting Kees Cook: |
| 532 |
#. If BPF even allows changing the data, it's not copied back to |
| 533 |
#. the syscall when it runs. Anything wanting to do things like |
| 534 |
#. that would need to use ptrace to catch the call and directly |
| 535 |
#. modify the registers before continuing with the call. |
| 536 |
#. type: Plain text |
| 537 |
#. #-#-#-#-# opensuse-tumbleweed: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 538 |
#. Quoting Kees Cook: |
| 539 |
#. If BPF even allows changing the data, it's not copied back to |
| 540 |
#. the syscall when it runs. Anything wanting to do things like |
| 541 |
#. that would need to use ptrace to catch the call and directly |
| 542 |
#. modify the registers before continuing with the call. |
| 543 |
#. type: Plain text |
| 544 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 545 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 546 |
msgid "" |
| 547 |
"When executing the instructions, the BPF program operates on the system call " |
| 548 |
"information made available (i.e., use the B<BPF_ABS> addressing mode) as a " |
| 549 |
"(read-only) buffer of the following form:" |
| 550 |
msgstr "" |
| 551 |
|
| 552 |
#. type: Plain text |
| 553 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 554 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 555 |
#, no-wrap |
| 556 |
msgid "" |
| 557 |
"struct seccomp_data {\n" |
| 558 |
" int nr; /* System call number */\n" |
| 559 |
" __u32 arch; /* AUDIT_ARCH_* value\n" |
| 560 |
" (see E<lt>linux/audit.hE<gt>) */\n" |
| 561 |
" __u64 instruction_pointer; /* CPU instruction pointer */\n" |
| 562 |
" __u64 args[6]; /* Up to 6 system call arguments */\n" |
| 563 |
"};\n" |
| 564 |
msgstr "" |
| 565 |
|
| 566 |
#. type: Plain text |
| 567 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 568 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 569 |
msgid "" |
| 570 |
"Because numbering of system calls varies between architectures and some " |
| 571 |
"architectures (e.g., x86-64) allow user-space code to use the calling " |
| 572 |
"conventions of multiple architectures (and the convention being used may " |
| 573 |
"vary over the life of a process that uses B<execve>(2) to execute binaries " |
| 574 |
"that employ the different conventions), it is usually necessary to verify " |
| 575 |
"the value of the I<arch> field." |
| 576 |
msgstr "" |
| 577 |
|
| 578 |
#. type: Plain text |
| 579 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 580 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 581 |
msgid "" |
| 582 |
"It is strongly recommended to use an allow-list approach whenever possible " |
| 583 |
"because such an approach is more robust and simple. A deny-list will have " |
| 584 |
"to be updated whenever a potentially dangerous system call is added (or a " |
| 585 |
"dangerous flag or option if those are deny-listed), and it is often possible " |
| 586 |
"to alter the representation of a value without altering its meaning, leading " |
| 587 |
"to a deny-list bypass. See also I<Caveats> below." |
| 588 |
msgstr "" |
| 589 |
|
| 590 |
# |
| 591 |
#. As noted by Dave Drysdale in a note at the end of |
| 592 |
#. https://lwn.net/Articles/604515/ |
| 593 |
#. One additional detail to point out for the x32 ABI case: |
| 594 |
#. the syscall number gets a high bit set (__X32_SYSCALL_BIT), |
| 595 |
#. to mark it as an x32 call. |
| 596 |
#. If x32 support is included in the kernel, then __SYSCALL_MASK |
| 597 |
#. will have a value that is not all-ones, and this will trigger |
| 598 |
#. an extra instruction in system_call to mask off the extra bit, |
| 599 |
#. so that the syscall table indexing still works. |
| 600 |
#. type: Plain text |
| 601 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 602 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 603 |
msgid "" |
| 604 |
"The I<arch> field is not unique for all calling conventions. The x86-64 ABI " |
| 605 |
"and the x32 ABI both use B<AUDIT_ARCH_X86_64> as I<arch>, and they run on " |
| 606 |
"the same processors. Instead, the mask B<__X32_SYSCALL_BIT> is used on the " |
| 607 |
"system call number to tell the two ABIs apart." |
| 608 |
msgstr "" |
| 609 |
|
| 610 |
#. type: Plain text |
| 611 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 612 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 613 |
msgid "" |
| 614 |
"This means that a policy must either deny all syscalls with " |
| 615 |
"B<__X32_SYSCALL_BIT> or it must recognize syscalls with and without " |
| 616 |
"B<__X32_SYSCALL_BIT> set. A list of system calls to be denied based on " |
| 617 |
"I<nr> that does not also contain I<nr> values with B<__X32_SYSCALL_BIT> set " |
| 618 |
"can be bypassed by a malicious program that sets B<__X32_SYSCALL_BIT>." |
| 619 |
msgstr "" |
| 620 |
|
| 621 |
#. commit 6365b842aae4490ebfafadfc6bb27a6d3cc54757 |
| 622 |
#. type: Plain text |
| 623 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 624 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 625 |
msgid "" |
| 626 |
"Additionally, kernels prior to Linux 5.4 incorrectly permitted I<nr> in the " |
| 627 |
"ranges 512-547 as well as the corresponding non-x32 syscalls ORed with " |
| 628 |
"B<__X32_SYSCALL_BIT>. For example, I<nr> == 521 and I<nr> == (101 | " |
| 629 |
"B<__X32_SYSCALL_BIT>) would result in invocations of B<ptrace>(2) with " |
| 630 |
"potentially confused x32-vs-x86_64 semantics in the kernel. Policies " |
| 631 |
"intended to work on kernels before Linux 5.4 must ensure that they deny or " |
| 632 |
"otherwise correctly handle these system calls. On Linux 5.4 and newer, such " |
| 633 |
"system calls will fail with the error B<ENOSYS>, without doing anything." |
| 634 |
msgstr "" |
| 635 |
|
| 636 |
#. type: Plain text |
| 637 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 638 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 639 |
msgid "" |
| 640 |
"The I<instruction_pointer> field provides the address of the machine-" |
| 641 |
"language instruction that performed the system call. This might be useful " |
| 642 |
"in conjunction with the use of I</proc/>pidI</maps> to perform checks based " |
| 643 |
"on which region (mapping) of the program made the system call. (Probably, " |
| 644 |
"it is wise to lock down the B<mmap>(2) and B<mprotect>(2) system calls to " |
| 645 |
"prevent the program from subverting such checks.)" |
| 646 |
msgstr "" |
| 647 |
|
| 648 |
#. type: Plain text |
| 649 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 650 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 651 |
msgid "" |
| 652 |
"When checking values from I<args>, keep in mind that arguments are often " |
| 653 |
"silently truncated before being processed, but after the seccomp check. For " |
| 654 |
"example, this happens if the i386 ABI is used on an x86-64 kernel: although " |
| 655 |
"the kernel will normally not look beyond the 32 lowest bits of the " |
| 656 |
"arguments, the values of the full 64-bit registers will be present in the " |
| 657 |
"seccomp data. A less surprising example is that if the x86-64 ABI is used " |
| 658 |
"to perform a system call that takes an argument of type I<int>, the more-" |
| 659 |
"significant half of the argument register is ignored by the system call, but " |
| 660 |
"visible in the seccomp data." |
| 661 |
msgstr "" |
| 662 |
|
| 663 |
#. type: Plain text |
| 664 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 665 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 666 |
msgid "" |
| 667 |
"A seccomp filter returns a 32-bit value consisting of two parts: the most " |
| 668 |
"significant 16 bits (corresponding to the mask defined by the constant " |
| 669 |
"B<SECCOMP_RET_ACTION_FULL>) contain one of the \"action\" values listed " |
| 670 |
"below; the least significant 16-bits (defined by the constant " |
| 671 |
"B<SECCOMP_RET_DATA>) are \"data\" to be associated with this return value." |
| 672 |
msgstr "" |
| 673 |
|
| 674 |
# |
| 675 |
#. #-#-#-#-# archlinux: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 676 |
#. From an Aug 2015 conversation with Kees Cook where I asked why *all* |
| 677 |
#. filters are applied even if one of the early filters returns |
| 678 |
#. SECCOMP_RET_KILL: |
| 679 |
#. It's just because it would be an optimization that would only speed up |
| 680 |
#. the RET_KILL case, but it's the uncommon one and the one that doesn't |
| 681 |
#. benefit meaningfully from such a change (you need to kill the process |
| 682 |
#. really quickly?). We would speed up killing a program at the (albeit |
| 683 |
#. tiny) expense to all other filtered programs. Best to keep the filter |
| 684 |
#. execution logic clear, simple, and as fast as possible for all |
| 685 |
#. filters. |
| 686 |
#. type: Plain text |
| 687 |
#. #-#-#-#-# debian-trixie: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 688 |
#. From an Aug 2015 conversation with Kees Cook where I asked why *all* |
| 689 |
#. filters are applied even if one of the early filters returns |
| 690 |
#. SECCOMP_RET_KILL: |
| 691 |
#. It's just because it would be an optimization that would only speed up |
| 692 |
#. the RET_KILL case, but it's the uncommon one and the one that doesn't |
| 693 |
#. benefit meaningfully from such a change (you need to kill the process |
| 694 |
#. really quickly?). We would speed up killing a program at the (albeit |
| 695 |
#. tiny) expense to all other filtered programs. Best to keep the filter |
| 696 |
#. execution logic clear, simple, and as fast as possible for all |
| 697 |
#. filters. |
| 698 |
#. type: Plain text |
| 699 |
#. #-#-#-#-# debian-unstable: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 700 |
#. From an Aug 2015 conversation with Kees Cook where I asked why *all* |
| 701 |
#. filters are applied even if one of the early filters returns |
| 702 |
#. SECCOMP_RET_KILL: |
| 703 |
#. It's just because it would be an optimization that would only speed up |
| 704 |
#. the RET_KILL case, but it's the uncommon one and the one that doesn't |
| 705 |
#. benefit meaningfully from such a change (you need to kill the process |
| 706 |
#. really quickly?). We would speed up killing a program at the (albeit |
| 707 |
#. tiny) expense to all other filtered programs. Best to keep the filter |
| 708 |
#. execution logic clear, simple, and as fast as possible for all |
| 709 |
#. filters. |
| 710 |
#. type: Plain text |
| 711 |
#. #-#-#-#-# fedora-44: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 712 |
#. From an Aug 2015 conversation with Kees Cook where I asked why *all* |
| 713 |
#. filters are applied even if one of the early filters returns |
| 714 |
#. SECCOMP_RET_KILL: |
| 715 |
#. It's just because it would be an optimization that would only speed up |
| 716 |
#. the RET_KILL case, but it's the uncommon one and the one that doesn't |
| 717 |
#. benefit meaningfully from such a change (you need to kill the process |
| 718 |
#. really quickly?). We would speed up killing a program at the (albeit |
| 719 |
#. tiny) expense to all other filtered programs. Best to keep the filter |
| 720 |
#. execution logic clear, simple, and as fast as possible for all |
| 721 |
#. filters. |
| 722 |
#. type: Plain text |
| 723 |
#. #-#-#-#-# fedora-rawhide: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 724 |
#. From an Aug 2015 conversation with Kees Cook where I asked why *all* |
| 725 |
#. filters are applied even if one of the early filters returns |
| 726 |
#. SECCOMP_RET_KILL: |
| 727 |
#. It's just because it would be an optimization that would only speed up |
| 728 |
#. the RET_KILL case, but it's the uncommon one and the one that doesn't |
| 729 |
#. benefit meaningfully from such a change (you need to kill the process |
| 730 |
#. really quickly?). We would speed up killing a program at the (albeit |
| 731 |
#. tiny) expense to all other filtered programs. Best to keep the filter |
| 732 |
#. execution logic clear, simple, and as fast as possible for all |
| 733 |
#. filters. |
| 734 |
#. type: Plain text |
| 735 |
#. #-#-#-#-# mageia-cauldron: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 736 |
#. From an Aug 2015 conversation with Kees Cook where I asked why *all* |
| 737 |
#. filters are applied even if one of the early filters returns |
| 738 |
#. SECCOMP_RET_KILL: |
| 739 |
#. It's just because it would be an optimization that would only speed up |
| 740 |
#. the RET_KILL case, but it's the uncommon one and the one that doesn't |
| 741 |
#. benefit meaningfully from such a change (you need to kill the process |
| 742 |
#. really quickly?). We would speed up killing a program at the (albeit |
| 743 |
#. tiny) expense to all other filtered programs. Best to keep the filter |
| 744 |
#. execution logic clear, simple, and as fast as possible for all |
| 745 |
#. filters. |
| 746 |
#. type: Plain text |
| 747 |
#. #-#-#-#-# opensuse-leap-16-1: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 748 |
#. From an Aug 2015 conversation with Kees Cook where I asked why *all* |
| 749 |
#. filters are applied even if one of the early filters returns |
| 750 |
#. SECCOMP_RET_KILL: |
| 751 |
#. It's just because it would be an optimization that would only speed up |
| 752 |
#. the RET_KILL case, but it's the uncommon one and the one that doesn't |
| 753 |
#. benefit meaningfully from such a change (you need to kill the process |
| 754 |
#. really quickly?). We would speed up killing a program at the (albeit |
| 755 |
#. tiny) expense to all other filtered programs. Best to keep the filter |
| 756 |
#. execution logic clear, simple, and as fast as possible for all |
| 757 |
#. filters. |
| 758 |
#. type: Plain text |
| 759 |
#. #-#-#-#-# opensuse-tumbleweed: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 760 |
#. From an Aug 2015 conversation with Kees Cook where I asked why *all* |
| 761 |
#. filters are applied even if one of the early filters returns |
| 762 |
#. SECCOMP_RET_KILL: |
| 763 |
#. It's just because it would be an optimization that would only speed up |
| 764 |
#. the RET_KILL case, but it's the uncommon one and the one that doesn't |
| 765 |
#. benefit meaningfully from such a change (you need to kill the process |
| 766 |
#. really quickly?). We would speed up killing a program at the (albeit |
| 767 |
#. tiny) expense to all other filtered programs. Best to keep the filter |
| 768 |
#. execution logic clear, simple, and as fast as possible for all |
| 769 |
#. filters. |
| 770 |
#. type: Plain text |
| 771 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 772 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 773 |
msgid "" |
| 774 |
"If multiple filters exist, they are I<all> executed, in reverse order of " |
| 775 |
"their addition to the filter tree\\[em]that is, the most recently installed " |
| 776 |
"filter is executed first. (Note that all filters will be called even if one " |
| 777 |
"of the earlier filters returns B<SECCOMP_RET_KILL>. This is done to " |
| 778 |
"simplify the kernel code and to provide a tiny speed-up in the execution of " |
| 779 |
"sets of filters by avoiding a check for this uncommon case.) The return " |
| 780 |
"value for the evaluation of a given system call is the first-seen action " |
| 781 |
"value of highest precedence (along with its accompanying data) returned by " |
| 782 |
"execution of all of the filters." |
| 783 |
msgstr "" |
| 784 |
|
| 785 |
#. type: Plain text |
| 786 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 787 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 788 |
msgid "" |
| 789 |
"In decreasing order of precedence, the action values that may be returned by " |
| 790 |
"a seccomp filter are:" |
| 791 |
msgstr "" |
| 792 |
|
| 793 |
#. type: TP |
| 794 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 795 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 796 |
#, no-wrap |
| 797 |
msgid "B<SECCOMP_RET_KILL_PROCESS> (since Linux 4.14)" |
| 798 |
msgstr "" |
| 799 |
|
| 800 |
#. commit 4d3b0b05aae9ee9ce0970dc4cc0fb3fad5e85945 |
| 801 |
#. commit 0466bdb99e8744bc9befa8d62a317f0fd7fd7421 |
| 802 |
#. type: Plain text |
| 803 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 804 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 805 |
msgid "" |
| 806 |
"This value results in immediate termination of the process, with a core " |
| 807 |
"dump. The system call is not executed. By contrast with " |
| 808 |
"B<SECCOMP_RET_KILL_THREAD> below, all threads in the thread group are " |
| 809 |
"terminated. (For a discussion of thread groups, see the description of the " |
| 810 |
"B<CLONE_THREAD> flag in B<clone>(2).)" |
| 811 |
msgstr "" |
| 812 |
|
| 813 |
#. type: Plain text |
| 814 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 815 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 816 |
msgid "" |
| 817 |
"The process terminates I<as though> killed by a B<SIGSYS> signal. Even if a " |
| 818 |
"signal handler has been registered for B<SIGSYS>, the handler will be " |
| 819 |
"ignored in this case and the process always terminates. To a parent process " |
| 820 |
"that is waiting on this process (using B<waitpid>(2) or similar), the " |
| 821 |
"returned I<wstatus> will indicate that its child was terminated as though by " |
| 822 |
"a B<SIGSYS> signal." |
| 823 |
msgstr "" |
| 824 |
|
| 825 |
#. type: TP |
| 826 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 827 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 828 |
#, no-wrap |
| 829 |
msgid "B<SECCOMP_RET_KILL_THREAD> (or B<SECCOMP_RET_KILL>)" |
| 830 |
msgstr "" |
| 831 |
|
| 832 |
#. type: Plain text |
| 833 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 834 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 835 |
msgid "" |
| 836 |
"This value results in immediate termination of the thread that made the " |
| 837 |
"system call. The system call is not executed. Other threads in the same " |
| 838 |
"thread group will continue to execute." |
| 839 |
msgstr "" |
| 840 |
|
| 841 |
#. type: Plain text |
| 842 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 843 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 844 |
msgid "" |
| 845 |
"The thread terminates I<as though> killed by a B<SIGSYS> signal. See " |
| 846 |
"B<SECCOMP_RET_KILL_PROCESS> above." |
| 847 |
msgstr "" |
| 848 |
|
| 849 |
#. See these commits: |
| 850 |
#. seccomp: dump core when using SECCOMP_RET_KILL |
| 851 |
#. (b25e67161c295c98acda92123b2dd1e7d8642901) |
| 852 |
#. seccomp: Only dump core when single-threaded |
| 853 |
#. (d7276e321ff8a53106a59c85ca46d03e34288893) |
| 854 |
#. type: Plain text |
| 855 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 856 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 857 |
msgid "" |
| 858 |
"Before Linux 4.11, any process terminated in this way would not trigger a " |
| 859 |
"coredump (even though B<SIGSYS> is documented in B<signal>(7) as having a " |
| 860 |
"default action of termination with a core dump). Since Linux 4.11, a single-" |
| 861 |
"threaded process will dump core if terminated in this way." |
| 862 |
msgstr "" |
| 863 |
|
| 864 |
#. type: Plain text |
| 865 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 866 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 867 |
msgid "" |
| 868 |
"With the addition of B<SECCOMP_RET_KILL_PROCESS> in Linux 4.14, " |
| 869 |
"B<SECCOMP_RET_KILL_THREAD> was added as a synonym for B<SECCOMP_RET_KILL>, " |
| 870 |
"in order to more clearly distinguish the two actions." |
| 871 |
msgstr "" |
| 872 |
|
| 873 |
#. type: Plain text |
| 874 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 875 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 876 |
msgid "" |
| 877 |
"B<Note>: the use of B<SECCOMP_RET_KILL_THREAD> to kill a single thread in a " |
| 878 |
"multithreaded process is likely to leave the process in a permanently " |
| 879 |
"inconsistent and possibly corrupt state." |
| 880 |
msgstr "" |
| 881 |
|
| 882 |
#. type: TP |
| 883 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 884 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 885 |
#, no-wrap |
| 886 |
msgid "B<SECCOMP_RET_TRAP>" |
| 887 |
msgstr "" |
| 888 |
|
| 889 |
#. type: Plain text |
| 890 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 891 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 892 |
msgid "" |
| 893 |
"This value results in the kernel sending a thread-directed B<SIGSYS> signal " |
| 894 |
"to the triggering thread. (The system call is not executed.) Various " |
| 895 |
"fields will be set in the I<siginfo_t> structure (see B<sigaction>(2)) " |
| 896 |
"associated with signal:" |
| 897 |
msgstr "" |
| 898 |
|
| 899 |
#. type: IP |
| 900 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 901 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 902 |
#, no-wrap |
| 903 |
msgid "\\[bu]" |
| 904 |
msgstr "" |
| 905 |
|
| 906 |
#. type: Plain text |
| 907 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 908 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 909 |
msgid "I<si_signo> will contain B<SIGSYS>." |
| 910 |
msgstr "" |
| 911 |
|
| 912 |
#. type: Plain text |
| 913 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 914 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 915 |
msgid "I<si_call_addr> will show the address of the system call instruction." |
| 916 |
msgstr "" |
| 917 |
|
| 918 |
#. type: Plain text |
| 919 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 920 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 921 |
msgid "" |
| 922 |
"I<si_syscall> and I<si_arch> will indicate which system call was attempted." |
| 923 |
msgstr "" |
| 924 |
|
| 925 |
#. type: Plain text |
| 926 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 927 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 928 |
msgid "I<si_code> will contain B<SYS_SECCOMP>." |
| 929 |
msgstr "" |
| 930 |
|
| 931 |
#. type: Plain text |
| 932 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 933 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 934 |
msgid "" |
| 935 |
"I<si_errno> will contain the B<SECCOMP_RET_DATA> portion of the filter " |
| 936 |
"return value." |
| 937 |
msgstr "" |
| 938 |
|
| 939 |
#. type: Plain text |
| 940 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 941 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 942 |
msgid "" |
| 943 |
"The program counter will be as though the system call happened (i.e., the " |
| 944 |
"program counter will not point to the system call instruction). The return " |
| 945 |
"value register will contain an architecture-dependent value; if resuming " |
| 946 |
"execution, set it to something appropriate for the system call. (The " |
| 947 |
"architecture dependency is because replacing it with B<ENOSYS> could " |
| 948 |
"overwrite some useful information.)" |
| 949 |
msgstr "" |
| 950 |
|
| 951 |
#. type: TP |
| 952 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 953 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 954 |
#, no-wrap |
| 955 |
msgid "B<SECCOMP_RET_ERRNO>" |
| 956 |
msgstr "" |
| 957 |
|
| 958 |
#. type: Plain text |
| 959 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 960 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 961 |
msgid "" |
| 962 |
"This value results in the B<SECCOMP_RET_DATA> portion of the filter's return " |
| 963 |
"value being passed to user space as the I<errno> value without executing the " |
| 964 |
"system call." |
| 965 |
msgstr "" |
| 966 |
|
| 967 |
#. type: TP |
| 968 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 969 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 970 |
#, no-wrap |
| 971 |
msgid "B<SECCOMP_RET_USER_NOTIF> (since Linux 5.0)" |
| 972 |
msgstr "" |
| 973 |
|
| 974 |
#. commit 6a21cc50f0c7f87dae5259f6cfefe024412313f6 |
| 975 |
#. type: Plain text |
| 976 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 977 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 978 |
msgid "" |
| 979 |
"Forward the system call to an attached user-space supervisor process to " |
| 980 |
"allow that process to decide what to do with the system call. If there is " |
| 981 |
"no attached supervisor (either because the filter was not installed with the " |
| 982 |
"B<SECCOMP_FILTER_FLAG_NEW_LISTENER> flag or because the file descriptor was " |
| 983 |
"closed), the filter returns B<ENOSYS> (similar to what happens when a filter " |
| 984 |
"returns B<SECCOMP_RET_TRACE> and there is no tracer). See " |
| 985 |
"B<seccomp_unotify>(2) for further details." |
| 986 |
msgstr "" |
| 987 |
|
| 988 |
#. type: Plain text |
| 989 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 990 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 991 |
msgid "" |
| 992 |
"Note that the supervisor process will not be notified if another filter " |
| 993 |
"returns an action value with a precedence greater than " |
| 994 |
"B<SECCOMP_RET_USER_NOTIF>." |
| 995 |
msgstr "" |
| 996 |
|
| 997 |
#. type: TP |
| 998 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 999 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1000 |
#, no-wrap |
| 1001 |
msgid "B<SECCOMP_RET_TRACE>" |
| 1002 |
msgstr "" |
| 1003 |
|
| 1004 |
#. type: Plain text |
| 1005 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1006 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1007 |
msgid "" |
| 1008 |
"When returned, this value will cause the kernel to attempt to notify a " |
| 1009 |
"B<ptrace>(2)-based tracer prior to executing the system call. If there is " |
| 1010 |
"no tracer present, the system call is not executed and returns a failure " |
| 1011 |
"status with I<errno> set to B<ENOSYS>." |
| 1012 |
msgstr "" |
| 1013 |
|
| 1014 |
#. type: Plain text |
| 1015 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1016 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1017 |
msgid "" |
| 1018 |
"A tracer will be notified if it requests B<PTRACE_O_TRACESECCOMP> using " |
| 1019 |
"I<ptrace(PTRACE_SETOPTIONS)>. The tracer will be notified of a " |
| 1020 |
"B<PTRACE_EVENT_SECCOMP> and the B<SECCOMP_RET_DATA> portion of the filter's " |
| 1021 |
"return value will be available to the tracer via B<PTRACE_GETEVENTMSG>." |
| 1022 |
msgstr "" |
| 1023 |
|
| 1024 |
#. type: Plain text |
| 1025 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1026 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1027 |
msgid "" |
| 1028 |
"The tracer can skip the system call by changing the system call number to " |
| 1029 |
"-1. Alternatively, the tracer can change the system call requested by " |
| 1030 |
"changing the system call to a valid system call number. If the tracer asks " |
| 1031 |
"to skip the system call, then the system call will appear to return the " |
| 1032 |
"value that the tracer puts in the return value register." |
| 1033 |
msgstr "" |
| 1034 |
|
| 1035 |
#. #-#-#-#-# archlinux: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1036 |
#. This was changed in ce6526e8afa4. |
| 1037 |
#. A related hole, using PTRACE_SYSCALL instead of SECCOMP_RET_TRACE, was |
| 1038 |
#. changed in arch-specific commits, e.g., 93e35efb8de4 for X86 and |
| 1039 |
#. 0f3912fd934c for ARM. |
| 1040 |
#. type: Plain text |
| 1041 |
#. #-#-#-#-# debian-trixie: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1042 |
#. This was changed in ce6526e8afa4. |
| 1043 |
#. A related hole, using PTRACE_SYSCALL instead of SECCOMP_RET_TRACE, was |
| 1044 |
#. changed in arch-specific commits, e.g. 93e35efb8de4 for X86 and |
| 1045 |
#. 0f3912fd934c for ARM. |
| 1046 |
#. type: Plain text |
| 1047 |
#. #-#-#-#-# debian-unstable: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1048 |
#. This was changed in ce6526e8afa4. |
| 1049 |
#. A related hole, using PTRACE_SYSCALL instead of SECCOMP_RET_TRACE, was |
| 1050 |
#. changed in arch-specific commits, e.g., 93e35efb8de4 for X86 and |
| 1051 |
#. 0f3912fd934c for ARM. |
| 1052 |
#. type: Plain text |
| 1053 |
#. #-#-#-#-# fedora-44: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1054 |
#. This was changed in ce6526e8afa4. |
| 1055 |
#. A related hole, using PTRACE_SYSCALL instead of SECCOMP_RET_TRACE, was |
| 1056 |
#. changed in arch-specific commits, e.g. 93e35efb8de4 for X86 and |
| 1057 |
#. 0f3912fd934c for ARM. |
| 1058 |
#. type: Plain text |
| 1059 |
#. #-#-#-#-# fedora-rawhide: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1060 |
#. This was changed in ce6526e8afa4. |
| 1061 |
#. A related hole, using PTRACE_SYSCALL instead of SECCOMP_RET_TRACE, was |
| 1062 |
#. changed in arch-specific commits, e.g. 93e35efb8de4 for X86 and |
| 1063 |
#. 0f3912fd934c for ARM. |
| 1064 |
#. type: Plain text |
| 1065 |
#. #-#-#-#-# mageia-cauldron: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1066 |
#. This was changed in ce6526e8afa4. |
| 1067 |
#. A related hole, using PTRACE_SYSCALL instead of SECCOMP_RET_TRACE, was |
| 1068 |
#. changed in arch-specific commits, e.g., 93e35efb8de4 for X86 and |
| 1069 |
#. 0f3912fd934c for ARM. |
| 1070 |
#. type: Plain text |
| 1071 |
#. #-#-#-#-# opensuse-leap-16-1: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1072 |
#. This was changed in ce6526e8afa4. |
| 1073 |
#. A related hole, using PTRACE_SYSCALL instead of SECCOMP_RET_TRACE, was |
| 1074 |
#. changed in arch-specific commits, e.g., 93e35efb8de4 for X86 and |
| 1075 |
#. 0f3912fd934c for ARM. |
| 1076 |
#. type: Plain text |
| 1077 |
#. #-#-#-#-# opensuse-tumbleweed: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1078 |
#. This was changed in ce6526e8afa4. |
| 1079 |
#. A related hole, using PTRACE_SYSCALL instead of SECCOMP_RET_TRACE, was |
| 1080 |
#. changed in arch-specific commits, e.g., 93e35efb8de4 for X86 and |
| 1081 |
#. 0f3912fd934c for ARM. |
| 1082 |
#. type: Plain text |
| 1083 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1084 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1085 |
msgid "" |
| 1086 |
"Before Linux 4.8, the seccomp check will not be run again after the tracer " |
| 1087 |
"is notified. (This means that, on older kernels, seccomp-based sandboxes " |
| 1088 |
"B<must not> allow use of B<ptrace>(2)\\[em]even of other sandboxed " |
| 1089 |
"processes\\[em]without extreme care; ptracers can use this mechanism to " |
| 1090 |
"escape from the seccomp sandbox.)" |
| 1091 |
msgstr "" |
| 1092 |
|
| 1093 |
#. type: Plain text |
| 1094 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1095 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1096 |
msgid "" |
| 1097 |
"Note that a tracer process will not be notified if another filter returns an " |
| 1098 |
"action value with a precedence greater than B<SECCOMP_RET_TRACE>." |
| 1099 |
msgstr "" |
| 1100 |
|
| 1101 |
#. type: TP |
| 1102 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1103 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1104 |
#, no-wrap |
| 1105 |
msgid "B<SECCOMP_RET_LOG> (since Linux 4.14)" |
| 1106 |
msgstr "" |
| 1107 |
|
| 1108 |
#. commit 59f5cf44a38284eb9e76270c786fb6cc62ef8ac4 |
| 1109 |
#. type: Plain text |
| 1110 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1111 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1112 |
msgid "" |
| 1113 |
"This value results in the system call being executed after the filter return " |
| 1114 |
"action is logged. An administrator may override the logging of this action " |
| 1115 |
"via the I</proc/sys/kernel/seccomp/actions_logged> file." |
| 1116 |
msgstr "" |
| 1117 |
|
| 1118 |
#. type: TP |
| 1119 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1120 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1121 |
#, no-wrap |
| 1122 |
msgid "B<SECCOMP_RET_ALLOW>" |
| 1123 |
msgstr "" |
| 1124 |
|
| 1125 |
#. type: Plain text |
| 1126 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1127 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1128 |
msgid "This value results in the system call being executed." |
| 1129 |
msgstr "" |
| 1130 |
|
| 1131 |
#. commit 4d3b0b05aae9ee9ce0970dc4cc0fb3fad5e85945 |
| 1132 |
#. type: Plain text |
| 1133 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1134 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1135 |
msgid "" |
| 1136 |
"If an action value other than one of the above is specified, then the filter " |
| 1137 |
"action is treated as either B<SECCOMP_RET_KILL_PROCESS> (since Linux 4.14) " |
| 1138 |
"or B<SECCOMP_RET_KILL_THREAD> (in Linux 4.13 and earlier)." |
| 1139 |
msgstr "" |
| 1140 |
|
| 1141 |
#. type: SS |
| 1142 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1143 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1144 |
#, no-wrap |
| 1145 |
msgid "/proc interfaces" |
| 1146 |
msgstr "" |
| 1147 |
|
| 1148 |
#. type: Plain text |
| 1149 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1150 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1151 |
msgid "" |
| 1152 |
"The files in the directory I</proc/sys/kernel/seccomp> provide additional " |
| 1153 |
"seccomp information and configuration:" |
| 1154 |
msgstr "" |
| 1155 |
|
| 1156 |
#. type: TP |
| 1157 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1158 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1159 |
#, no-wrap |
| 1160 |
msgid "I<actions_avail> (since Linux 4.14)" |
| 1161 |
msgstr "" |
| 1162 |
|
| 1163 |
#. commit 8e5f1ad116df6b0de65eac458d5e7c318d1c05af |
| 1164 |
#. type: Plain text |
| 1165 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1166 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1167 |
msgid "" |
| 1168 |
"A read-only ordered list of seccomp filter return actions in string form. " |
| 1169 |
"The ordering, from left-to-right, is in decreasing order of precedence. The " |
| 1170 |
"list represents the set of seccomp filter return actions supported by the " |
| 1171 |
"kernel." |
| 1172 |
msgstr "" |
| 1173 |
|
| 1174 |
#. type: TP |
| 1175 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1176 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1177 |
#, no-wrap |
| 1178 |
msgid "I<actions_logged> (since Linux 4.14)" |
| 1179 |
msgstr "" |
| 1180 |
|
| 1181 |
#. commit 0ddec0fc8900201c0897b87b762b7c420436662f |
| 1182 |
#. type: Plain text |
| 1183 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1184 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1185 |
msgid "" |
| 1186 |
"A read-write ordered list of seccomp filter return actions that are allowed " |
| 1187 |
"to be logged. Writes to the file do not need to be in ordered form but " |
| 1188 |
"reads from the file will be ordered in the same way as the I<actions_avail> " |
| 1189 |
"file." |
| 1190 |
msgstr "" |
| 1191 |
|
| 1192 |
#. type: Plain text |
| 1193 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1194 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1195 |
msgid "" |
| 1196 |
"It is important to note that the value of I<actions_logged> does not prevent " |
| 1197 |
"certain filter return actions from being logged when the audit subsystem is " |
| 1198 |
"configured to audit a task. If the action is not found in the " |
| 1199 |
"I<actions_logged> file, the final decision on whether to audit the action " |
| 1200 |
"for that task is ultimately left up to the audit subsystem to decide for all " |
| 1201 |
"filter return actions other than B<SECCOMP_RET_ALLOW>." |
| 1202 |
msgstr "" |
| 1203 |
|
| 1204 |
#. type: Plain text |
| 1205 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1206 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1207 |
msgid "" |
| 1208 |
"The \"allow\" string is not accepted in the I<actions_logged> file as it is " |
| 1209 |
"not possible to log B<SECCOMP_RET_ALLOW> actions. Attempting to write " |
| 1210 |
"\"allow\" to the file will fail with the error B<EINVAL>." |
| 1211 |
msgstr "" |
| 1212 |
|
| 1213 |
#. type: SS |
| 1214 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1215 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1216 |
#, no-wrap |
| 1217 |
msgid "Audit logging of seccomp actions" |
| 1218 |
msgstr "" |
| 1219 |
|
| 1220 |
#. commit 59f5cf44a38284eb9e76270c786fb6cc62ef8ac4 |
| 1221 |
#. or auditing could be enabled via the netlink API (AUDIT_SET) |
| 1222 |
#. type: Plain text |
| 1223 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1224 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1225 |
msgid "" |
| 1226 |
"Since Linux 4.14, the kernel provides the facility to log the actions " |
| 1227 |
"returned by seccomp filters in the audit log. The kernel makes the decision " |
| 1228 |
"to log an action based on the action type, whether or not the action is " |
| 1229 |
"present in the I<actions_logged> file, and whether kernel auditing is " |
| 1230 |
"enabled (e.g., via the kernel boot option I<audit=1>). The rules are as " |
| 1231 |
"follows:" |
| 1232 |
msgstr "" |
| 1233 |
|
| 1234 |
#. type: Plain text |
| 1235 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1236 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1237 |
msgid "If the action is B<SECCOMP_RET_ALLOW>, the action is not logged." |
| 1238 |
msgstr "" |
| 1239 |
|
| 1240 |
#. type: Plain text |
| 1241 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1242 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1243 |
msgid "" |
| 1244 |
"Otherwise, if the action is either B<SECCOMP_RET_KILL_PROCESS> or " |
| 1245 |
"B<SECCOMP_RET_KILL_THREAD>, and that action appears in the I<actions_logged> " |
| 1246 |
"file, the action is logged." |
| 1247 |
msgstr "" |
| 1248 |
|
| 1249 |
#. type: Plain text |
| 1250 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1251 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1252 |
msgid "" |
| 1253 |
"Otherwise, if the filter has requested logging (the " |
| 1254 |
"B<SECCOMP_FILTER_FLAG_LOG> flag) and the action appears in the " |
| 1255 |
"I<actions_logged> file, the action is logged." |
| 1256 |
msgstr "" |
| 1257 |
|
| 1258 |
#. type: Plain text |
| 1259 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1260 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1261 |
msgid "" |
| 1262 |
"Otherwise, if kernel auditing is enabled and the process is being audited " |
| 1263 |
"(B<autrace>(8)), the action is logged." |
| 1264 |
msgstr "" |
| 1265 |
|
| 1266 |
#. type: Plain text |
| 1267 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1268 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1269 |
msgid "Otherwise, the action is not logged." |
| 1270 |
msgstr "" |
| 1271 |
|
| 1272 |
#. type: SH |
| 1273 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1274 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1275 |
#, no-wrap |
| 1276 |
msgid "RETURN VALUE" |
| 1277 |
msgstr "" |
| 1278 |
|
| 1279 |
#. type: Plain text |
| 1280 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1281 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1282 |
msgid "" |
| 1283 |
"On success, B<seccomp>() returns 0. On error, if " |
| 1284 |
"B<SECCOMP_FILTER_FLAG_TSYNC> was used, the return value is the ID of the " |
| 1285 |
"thread that caused the synchronization failure. (This ID is a kernel thread " |
| 1286 |
"ID of the type returned by B<clone>(2) and B<gettid>(2).) On other errors, " |
| 1287 |
"-1 is returned, and I<errno> is set to indicate the error." |
| 1288 |
msgstr "" |
| 1289 |
|
| 1290 |
#. type: SH |
| 1291 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1292 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1293 |
#, no-wrap |
| 1294 |
msgid "ERRORS" |
| 1295 |
msgstr "" |
| 1296 |
|
| 1297 |
#. type: Plain text |
| 1298 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1299 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1300 |
msgid "B<seccomp>() can fail for the following reasons:" |
| 1301 |
msgstr "" |
| 1302 |
|
| 1303 |
#. type: TP |
| 1304 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1305 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1306 |
#, no-wrap |
| 1307 |
msgid "B<EACCES>" |
| 1308 |
msgstr "" |
| 1309 |
|
| 1310 |
#. type: Plain text |
| 1311 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1312 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1313 |
msgid "" |
| 1314 |
"The caller did not have the B<CAP_SYS_ADMIN> capability in its user " |
| 1315 |
"namespace, or had not set I<no_new_privs> before using " |
| 1316 |
"B<SECCOMP_SET_MODE_FILTER>." |
| 1317 |
msgstr "" |
| 1318 |
|
| 1319 |
#. type: TP |
| 1320 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1321 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1322 |
#, no-wrap |
| 1323 |
msgid "B<EBUSY>" |
| 1324 |
msgstr "" |
| 1325 |
|
| 1326 |
#. type: Plain text |
| 1327 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1328 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1329 |
msgid "" |
| 1330 |
"While installing a new filter, the B<SECCOMP_FILTER_FLAG_NEW_LISTENER> flag " |
| 1331 |
"was specified, but a previous filter had already been installed with that " |
| 1332 |
"flag." |
| 1333 |
msgstr "" |
| 1334 |
|
| 1335 |
#. type: TP |
| 1336 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1337 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1338 |
#, no-wrap |
| 1339 |
msgid "B<EFAULT>" |
| 1340 |
msgstr "" |
| 1341 |
|
| 1342 |
#. type: Plain text |
| 1343 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1344 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1345 |
msgid "I<args> was not a valid address." |
| 1346 |
msgstr "" |
| 1347 |
|
| 1348 |
#. type: TP |
| 1349 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1350 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1351 |
#, no-wrap |
| 1352 |
msgid "B<EINVAL>" |
| 1353 |
msgstr "" |
| 1354 |
|
| 1355 |
#. type: Plain text |
| 1356 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1357 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1358 |
msgid "" |
| 1359 |
"I<operation> is unknown or is not supported by this kernel version or " |
| 1360 |
"configuration." |
| 1361 |
msgstr "" |
| 1362 |
|
| 1363 |
#. type: Plain text |
| 1364 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1365 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1366 |
msgid "The specified I<flags> are invalid for the given I<operation>." |
| 1367 |
msgstr "" |
| 1368 |
|
| 1369 |
#. type: Plain text |
| 1370 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1371 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1372 |
msgid "" |
| 1373 |
"I<operation> included B<BPF_ABS>, but the specified offset was not aligned " |
| 1374 |
"to a 32-bit boundary or exceeded I<sizeof(struct\\ seccomp_data)>." |
| 1375 |
msgstr "" |
| 1376 |
|
| 1377 |
#. See kernel/seccomp.c::seccomp_may_assign_mode() in Linux 3.18 sources |
| 1378 |
#. type: Plain text |
| 1379 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1380 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1381 |
msgid "" |
| 1382 |
"A secure computing mode has already been set, and I<operation> differs from " |
| 1383 |
"the existing setting." |
| 1384 |
msgstr "" |
| 1385 |
|
| 1386 |
#. type: Plain text |
| 1387 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1388 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1389 |
msgid "" |
| 1390 |
"I<operation> specified B<SECCOMP_SET_MODE_FILTER>, but the filter program " |
| 1391 |
"pointed to by I<args> was not valid or the length of the filter program was " |
| 1392 |
"zero or exceeded B<BPF_MAXINSNS> (4096) instructions." |
| 1393 |
msgstr "" |
| 1394 |
|
| 1395 |
#. type: TP |
| 1396 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1397 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1398 |
#, no-wrap |
| 1399 |
msgid "B<ENOMEM>" |
| 1400 |
msgstr "" |
| 1401 |
|
| 1402 |
#. type: Plain text |
| 1403 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1404 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1405 |
msgid "Out of memory." |
| 1406 |
msgstr "" |
| 1407 |
|
| 1408 |
#. ENOMEM in kernel/seccomp.c::seccomp_attach_filter() in Linux 3.18 sources |
| 1409 |
#. type: Plain text |
| 1410 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1411 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1412 |
msgid "" |
| 1413 |
"The total length of all filter programs attached to the calling thread would " |
| 1414 |
"exceed B<MAX_INSNS_PER_PATH> (32768) instructions. Note that for the " |
| 1415 |
"purposes of calculating this limit, each already existing filter program " |
| 1416 |
"incurs an overhead penalty of 4 instructions." |
| 1417 |
msgstr "" |
| 1418 |
|
| 1419 |
#. type: TP |
| 1420 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1421 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1422 |
#, no-wrap |
| 1423 |
msgid "B<EOPNOTSUPP>" |
| 1424 |
msgstr "" |
| 1425 |
|
| 1426 |
#. type: Plain text |
| 1427 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1428 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1429 |
msgid "" |
| 1430 |
"I<operation> specified B<SECCOMP_GET_ACTION_AVAIL>, but the kernel does not " |
| 1431 |
"support the filter return action specified by I<args>." |
| 1432 |
msgstr "" |
| 1433 |
|
| 1434 |
#. type: TP |
| 1435 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1436 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1437 |
#, no-wrap |
| 1438 |
msgid "B<ESRCH>" |
| 1439 |
msgstr "" |
| 1440 |
|
| 1441 |
#. type: Plain text |
| 1442 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1443 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1444 |
msgid "" |
| 1445 |
"Another thread caused a failure during thread sync, but its ID could not be " |
| 1446 |
"determined." |
| 1447 |
msgstr "" |
| 1448 |
|
| 1449 |
#. type: SH |
| 1450 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1451 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1452 |
#, no-wrap |
| 1453 |
msgid "STANDARDS" |
| 1454 |
msgstr "" |
| 1455 |
|
| 1456 |
#. type: Plain text |
| 1457 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1458 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1459 |
msgid "Linux." |
| 1460 |
msgstr "" |
| 1461 |
|
| 1462 |
#. type: SH |
| 1463 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1464 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1465 |
#, no-wrap |
| 1466 |
msgid "HISTORY" |
| 1467 |
msgstr "" |
| 1468 |
|
| 1469 |
#. FIXME . Add glibc version |
| 1470 |
#. type: Plain text |
| 1471 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1472 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1473 |
msgid "Linux 3.17." |
| 1474 |
msgstr "" |
| 1475 |
|
| 1476 |
#. type: SH |
| 1477 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1478 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1479 |
#, no-wrap |
| 1480 |
msgid "NOTES" |
| 1481 |
msgstr "" |
| 1482 |
|
| 1483 |
#. type: Plain text |
| 1484 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1485 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1486 |
msgid "" |
| 1487 |
"Rather than hand-coding seccomp filters as shown in the example below, you " |
| 1488 |
"may prefer to employ the I<libseccomp> library, which provides a front-end " |
| 1489 |
"for generating seccomp filters." |
| 1490 |
msgstr "" |
| 1491 |
|
| 1492 |
#. type: Plain text |
| 1493 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1494 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1495 |
msgid "" |
| 1496 |
"The I<Seccomp> field of the I</proc/>pidI</status> file provides a method of " |
| 1497 |
"viewing the seccomp mode of a process; see B<proc>(5)." |
| 1498 |
msgstr "" |
| 1499 |
|
| 1500 |
#. type: Plain text |
| 1501 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1502 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1503 |
msgid "" |
| 1504 |
"B<seccomp>() provides a superset of the functionality provided by the " |
| 1505 |
"B<prctl>(2) B<PR_SET_SECCOMP> operation (which does not support I<flags>)." |
| 1506 |
msgstr "" |
| 1507 |
|
| 1508 |
#. type: Plain text |
| 1509 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1510 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1511 |
msgid "" |
| 1512 |
"Since Linux 4.4, the B<ptrace>(2) B<PTRACE_SECCOMP_GET_FILTER> operation " |
| 1513 |
"can be used to dump a process's seccomp filters." |
| 1514 |
msgstr "" |
| 1515 |
|
| 1516 |
#. type: SS |
| 1517 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1518 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1519 |
#, no-wrap |
| 1520 |
msgid "Architecture support for seccomp BPF" |
| 1521 |
msgstr "" |
| 1522 |
|
| 1523 |
#. #-#-#-#-# archlinux: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1524 |
#. Check by grepping for HAVE_ARCH_SECCOMP_FILTER in Kconfig files in |
| 1525 |
#. kernel source. Last checked in Linux 4.16-rc source. |
| 1526 |
#. type: Plain text |
| 1527 |
#. #-#-#-#-# debian-trixie: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1528 |
#. Check by grepping for HAVE_ARCH_SECCOMP_FILTER in Kconfig files in |
| 1529 |
#. kernel source. Last checked in Linux 4.16-rc source. |
| 1530 |
#. type: Plain text |
| 1531 |
#. #-#-#-#-# debian-unstable: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1532 |
#. Check by grepping for HAVE_ARCH_SECCOMP_FILTER in Kconfig files in |
| 1533 |
#. kernel source. Last checked in Linux 4.16-rc source. |
| 1534 |
#. type: Plain text |
| 1535 |
#. #-#-#-#-# fedora-44: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1536 |
#. Check by grepping for HAVE_ARCH_SECCOMP_FILTER in Kconfig files in |
| 1537 |
#. kernel source. Last checked in Linux 4.16-rc source. |
| 1538 |
#. type: Plain text |
| 1539 |
#. #-#-#-#-# fedora-rawhide: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1540 |
#. Check by grepping for HAVE_ARCH_SECCOMP_FILTER in Kconfig files in |
| 1541 |
#. kernel source. Last checked in Linux 4.16-rc source. |
| 1542 |
#. type: Plain text |
| 1543 |
#. #-#-#-#-# mageia-cauldron: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1544 |
#. Check by grepping for HAVE_ARCH_SECCOMP_FILTER in Kconfig files in |
| 1545 |
#. kernel source. Last checked in Linux 4.16-rc source. |
| 1546 |
#. type: Plain text |
| 1547 |
#. #-#-#-#-# opensuse-leap-16-1: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1548 |
#. Check by grepping for HAVE_ARCH_SECCOMP_FILTER in Kconfig files in |
| 1549 |
#. kernel source. Last checked in Linux 4.16-rc source. |
| 1550 |
#. type: Plain text |
| 1551 |
#. #-#-#-#-# opensuse-tumbleweed: seccomp.2.pot (PACKAGE VERSION) #-#-#-#-# |
| 1552 |
#. Check by grepping for HAVE_ARCH_SECCOMP_FILTER in Kconfig files in |
| 1553 |
#. kernel source. Last checked in Linux 4.16-rc source. |
| 1554 |
#. type: Plain text |
| 1555 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1556 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1557 |
msgid "" |
| 1558 |
"Architecture support for seccomp BPF filtering is available on the following " |
| 1559 |
"architectures:" |
| 1560 |
msgstr "" |
| 1561 |
|
| 1562 |
#. type: Plain text |
| 1563 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1564 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1565 |
msgid "x86-64, i386, x32 (since Linux 3.5)" |
| 1566 |
msgstr "" |
| 1567 |
|
| 1568 |
#. type: Plain text |
| 1569 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1570 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1571 |
msgid "ARM (since Linux 3.8)" |
| 1572 |
msgstr "" |
| 1573 |
|
| 1574 |
#. type: Plain text |
| 1575 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1576 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1577 |
msgid "s390 (since Linux 3.8)" |
| 1578 |
msgstr "" |
| 1579 |
|
| 1580 |
#. type: Plain text |
| 1581 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1582 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1583 |
msgid "MIPS (since Linux 3.16)" |
| 1584 |
msgstr "" |
| 1585 |
|
| 1586 |
#. type: Plain text |
| 1587 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1588 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1589 |
msgid "ARM-64 (since Linux 3.19)" |
| 1590 |
msgstr "" |
| 1591 |
|
| 1592 |
#. type: Plain text |
| 1593 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1594 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1595 |
msgid "PowerPC (since Linux 4.3)" |
| 1596 |
msgstr "" |
| 1597 |
|
| 1598 |
#. type: Plain text |
| 1599 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1600 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1601 |
msgid "Tile (since Linux 4.3)" |
| 1602 |
msgstr "" |
| 1603 |
|
| 1604 |
#. User mode Linux since Linux 4.6 |
| 1605 |
#. type: Plain text |
| 1606 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1607 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1608 |
msgid "PA-RISC (since Linux 4.6)" |
| 1609 |
msgstr "" |
| 1610 |
|
| 1611 |
#. type: SS |
| 1612 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1613 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1614 |
#, no-wrap |
| 1615 |
msgid "Caveats" |
| 1616 |
msgstr "" |
| 1617 |
|
| 1618 |
#. type: Plain text |
| 1619 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1620 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1621 |
msgid "" |
| 1622 |
"There are various subtleties to consider when applying seccomp filters to a " |
| 1623 |
"program, including the following:" |
| 1624 |
msgstr "" |
| 1625 |
|
| 1626 |
#. type: Plain text |
| 1627 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1628 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1629 |
msgid "" |
| 1630 |
"Some traditional system calls have user-space implementations in the " |
| 1631 |
"B<vdso>(7) on many architectures. Notable examples include " |
| 1632 |
"B<clock_gettime>(2), B<gettimeofday>(2), and B<time>(2). On such " |
| 1633 |
"architectures, seccomp filtering for these system calls will have no " |
| 1634 |
"effect. (However, there are cases where the B<vdso>(7) implementations may " |
| 1635 |
"fall back to invoking the true system call, in which case seccomp filters " |
| 1636 |
"would see the system call.)" |
| 1637 |
msgstr "" |
| 1638 |
|
| 1639 |
#. type: Plain text |
| 1640 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1641 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1642 |
msgid "" |
| 1643 |
"Seccomp filtering is based on system call numbers. However, applications " |
| 1644 |
"typically do not directly invoke system calls, but instead call wrapper " |
| 1645 |
"functions in the C library which in turn invoke the system calls. " |
| 1646 |
"Consequently, one must be aware of the following:" |
| 1647 |
msgstr "" |
| 1648 |
|
| 1649 |
#. type: Plain text |
| 1650 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1651 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1652 |
msgid "" |
| 1653 |
"The glibc wrappers for some traditional system calls may actually employ " |
| 1654 |
"system calls with different names in the kernel. For example, the " |
| 1655 |
"B<exit>(2) wrapper function actually employs the B<exit_group>(2) system " |
| 1656 |
"call, and the B<fork>(2) wrapper function actually calls B<clone>(2)." |
| 1657 |
msgstr "" |
| 1658 |
|
| 1659 |
#. type: Plain text |
| 1660 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1661 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1662 |
msgid "" |
| 1663 |
"The behavior of wrapper functions may vary across architectures, according " |
| 1664 |
"to the range of system calls provided on those architectures. In other " |
| 1665 |
"words, the same wrapper function may invoke different system calls on " |
| 1666 |
"different architectures." |
| 1667 |
msgstr "" |
| 1668 |
|
| 1669 |
#. type: Plain text |
| 1670 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1671 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1672 |
msgid "" |
| 1673 |
"Finally, the behavior of wrapper functions can change across glibc " |
| 1674 |
"versions. For example, in older versions, the glibc wrapper function for " |
| 1675 |
"B<open>(2) invoked the system call of the same name, but starting in glibc " |
| 1676 |
"2.26, the implementation switched to calling B<openat>(2) on all " |
| 1677 |
"architectures." |
| 1678 |
msgstr "" |
| 1679 |
|
| 1680 |
#. type: Plain text |
| 1681 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1682 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1683 |
msgid "" |
| 1684 |
"The consequence of the above points is that it may be necessary to filter " |
| 1685 |
"for a system call other than might be expected. Various manual pages in " |
| 1686 |
"Section 2 provide helpful details about the differences between wrapper " |
| 1687 |
"functions and the underlying system calls in subsections entitled I<C " |
| 1688 |
"library/kernel differences>." |
| 1689 |
msgstr "" |
| 1690 |
|
| 1691 |
#. type: Plain text |
| 1692 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1693 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1694 |
msgid "" |
| 1695 |
"Furthermore, note that the application of seccomp filters even risks causing " |
| 1696 |
"bugs in an application, when the filters cause unexpected failures for " |
| 1697 |
"legitimate operations that the application might need to perform. Such bugs " |
| 1698 |
"may not easily be discovered when testing the seccomp filters if the bugs " |
| 1699 |
"occur in rarely used application code paths." |
| 1700 |
msgstr "" |
| 1701 |
|
| 1702 |
#. type: SS |
| 1703 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1704 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1705 |
#, no-wrap |
| 1706 |
msgid "Seccomp-specific BPF details" |
| 1707 |
msgstr "" |
| 1708 |
|
| 1709 |
#. type: Plain text |
| 1710 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1711 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1712 |
msgid "Note the following BPF details specific to seccomp filters:" |
| 1713 |
msgstr "" |
| 1714 |
|
| 1715 |
#. type: Plain text |
| 1716 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1717 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1718 |
msgid "" |
| 1719 |
"The B<BPF_H> and B<BPF_B> size modifiers are not supported: all operations " |
| 1720 |
"must load and store (4-byte) words (B<BPF_W>)." |
| 1721 |
msgstr "" |
| 1722 |
|
| 1723 |
#. type: Plain text |
| 1724 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1725 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1726 |
msgid "" |
| 1727 |
"To access the contents of the I<seccomp_data> buffer, use the B<BPF_ABS> " |
| 1728 |
"addressing mode modifier." |
| 1729 |
msgstr "" |
| 1730 |
|
| 1731 |
#. type: Plain text |
| 1732 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1733 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1734 |
msgid "" |
| 1735 |
"The B<BPF_LEN> addressing mode modifier yields an immediate mode operand " |
| 1736 |
"whose value is the size of the I<seccomp_data> buffer." |
| 1737 |
msgstr "" |
| 1738 |
|
| 1739 |
#. type: SH |
| 1740 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1741 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1742 |
#, no-wrap |
| 1743 |
msgid "EXAMPLES" |
| 1744 |
msgstr "" |
| 1745 |
|
| 1746 |
#. type: Plain text |
| 1747 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1748 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1749 |
msgid "" |
| 1750 |
"The program below accepts four or more arguments. The first three arguments " |
| 1751 |
"are a system call number, a numeric architecture identifier, and an error " |
| 1752 |
"number. The program uses these values to construct a BPF filter that is " |
| 1753 |
"used at run time to perform the following checks:" |
| 1754 |
msgstr "" |
| 1755 |
|
| 1756 |
#. type: Plain text |
| 1757 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1758 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1759 |
msgid "" |
| 1760 |
"If the program is not running on the specified architecture, the BPF filter " |
| 1761 |
"causes system calls to fail with the error B<ENOSYS>." |
| 1762 |
msgstr "" |
| 1763 |
|
| 1764 |
#. type: Plain text |
| 1765 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1766 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1767 |
msgid "" |
| 1768 |
"If the program attempts to execute the system call with the specified " |
| 1769 |
"number, the BPF filter causes the system call to fail, with I<errno> being " |
| 1770 |
"set to the specified error number." |
| 1771 |
msgstr "" |
| 1772 |
|
| 1773 |
#. type: Plain text |
| 1774 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1775 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1776 |
msgid "" |
| 1777 |
"The remaining command-line arguments specify the pathname and additional " |
| 1778 |
"arguments of a program that the example program should attempt to execute " |
| 1779 |
"using B<execv>(3) (a library function that employs the B<execve>(2) system " |
| 1780 |
"call). Some example runs of the program are shown below." |
| 1781 |
msgstr "" |
| 1782 |
|
| 1783 |
#. type: Plain text |
| 1784 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1785 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1786 |
msgid "" |
| 1787 |
"First, we display the architecture that we are running on (x86-64) and then " |
| 1788 |
"construct a shell function that looks up system call numbers on this " |
| 1789 |
"architecture:" |
| 1790 |
msgstr "" |
| 1791 |
|
| 1792 |
#. type: Plain text |
| 1793 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1794 |
#: opensuse-tumbleweed |
| 1795 |
#, no-wrap |
| 1796 |
msgid "" |
| 1797 |
"$B< uname -m>;\n" |
| 1798 |
"x86_64\n" |
| 1799 |
"$ \\f[B]syscall_nr() {\n" |
| 1800 |
" cat /usr/src/linux/arch/x86/syscalls/syscall_64.tbl | \\[rs]\n" |
| 1801 |
" awk \\[aq]$2 != \\[dq]x32\\[dq] && $3 == \\[dq]\\[aq]$1\\[aq]\\[dq] { print $1 }\\[aq]\n" |
| 1802 |
"}\\fR;\n" |
| 1803 |
msgstr "" |
| 1804 |
|
| 1805 |
#. type: Plain text |
| 1806 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1807 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1808 |
msgid "" |
| 1809 |
"When the BPF filter rejects a system call (case [2] above), it causes the " |
| 1810 |
"system call to fail with the error number specified on the command line. In " |
| 1811 |
"the experiments shown here, we'll use error number 99:" |
| 1812 |
msgstr "" |
| 1813 |
|
| 1814 |
#. type: Plain text |
| 1815 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1816 |
#: opensuse-tumbleweed |
| 1817 |
#, no-wrap |
| 1818 |
msgid "" |
| 1819 |
"$B< errno 99>;\n" |
| 1820 |
"EADDRNOTAVAIL 99 Cannot assign requested address\n" |
| 1821 |
msgstr "" |
| 1822 |
|
| 1823 |
#. type: Plain text |
| 1824 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1825 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1826 |
msgid "" |
| 1827 |
"In the following example, we attempt to run the command B<whoami>(1), but " |
| 1828 |
"the BPF filter rejects the B<execve>(2) system call, so that the command is " |
| 1829 |
"not even executed:" |
| 1830 |
msgstr "" |
| 1831 |
|
| 1832 |
#. type: Plain text |
| 1833 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1834 |
#: opensuse-tumbleweed |
| 1835 |
#, no-wrap |
| 1836 |
msgid "" |
| 1837 |
"$B< syscall_nr execve>;\n" |
| 1838 |
"59\n" |
| 1839 |
"$B< ./a.out>;\n" |
| 1840 |
"Usage: ./a.out E<lt>syscall_nrE<gt> E<lt>archE<gt> E<lt>errnoE<gt> E<lt>progE<gt> [E<lt>argsE<gt>]\n" |
| 1841 |
"Hint for E<lt>archE<gt>: AUDIT_ARCH_I386: 0x40000003\n" |
| 1842 |
" AUDIT_ARCH_X86_64: 0xC000003E\n" |
| 1843 |
"$B< ./a.out 59 0xC000003E 99 /bin/whoami>;\n" |
| 1844 |
"execv: Cannot assign requested address\n" |
| 1845 |
msgstr "" |
| 1846 |
|
| 1847 |
#. type: Plain text |
| 1848 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1849 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1850 |
msgid "" |
| 1851 |
"In the next example, the BPF filter rejects the B<write>(2) system call, so " |
| 1852 |
"that, although it is successfully started, the B<whoami>(1) command is not " |
| 1853 |
"able to write output:" |
| 1854 |
msgstr "" |
| 1855 |
|
| 1856 |
#. type: Plain text |
| 1857 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1858 |
#: opensuse-tumbleweed |
| 1859 |
#, no-wrap |
| 1860 |
msgid "" |
| 1861 |
"$B< syscall_nr write>;\n" |
| 1862 |
"1\n" |
| 1863 |
"$B< ./a.out 1 0xC000003E 99 /bin/whoami>;\n" |
| 1864 |
msgstr "" |
| 1865 |
|
| 1866 |
#. type: Plain text |
| 1867 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1868 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1869 |
msgid "" |
| 1870 |
"In the final example, the BPF filter rejects a system call that is not used " |
| 1871 |
"by the B<whoami>(1) command, so it is able to successfully execute and " |
| 1872 |
"produce output:" |
| 1873 |
msgstr "" |
| 1874 |
|
| 1875 |
#. type: Plain text |
| 1876 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1877 |
#: opensuse-tumbleweed |
| 1878 |
#, no-wrap |
| 1879 |
msgid "" |
| 1880 |
"$B< syscall_nr preadv>;\n" |
| 1881 |
"295\n" |
| 1882 |
"$B< ./a.out 295 0xC000003E 99 /bin/whoami>;\n" |
| 1883 |
"cecilia\n" |
| 1884 |
msgstr "" |
| 1885 |
|
| 1886 |
#. type: SS |
| 1887 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 1888 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 1889 |
#, no-wrap |
| 1890 |
msgid "Program source" |
| 1891 |
msgstr "" |
| 1892 |
|
| 1893 |
#. type: Plain text |
| 1894 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 1895 |
#: opensuse-tumbleweed |
| 1896 |
#, no-wrap |
| 1897 |
msgid "" |
| 1898 |
"#include E<lt>linux/audit.hE<gt>\n" |
| 1899 |
"#include E<lt>linux/filter.hE<gt>\n" |
| 1900 |
"#include E<lt>linux/seccomp.hE<gt>\n" |
| 1901 |
"#include E<lt>stdcountof.hE<gt>\n" |
| 1902 |
"#include E<lt>stddef.hE<gt>\n" |
| 1903 |
"#include E<lt>stdio.hE<gt>\n" |
| 1904 |
"#include E<lt>stdlib.hE<gt>\n" |
| 1905 |
"#include E<lt>sys/prctl.hE<gt>\n" |
| 1906 |
"#include E<lt>sys/syscall.hE<gt>\n" |
| 1907 |
"#include E<lt>unistd.hE<gt>\n" |
| 1908 |
"\\&\n" |
| 1909 |
"#define X32_SYSCALL_BIT 0x40000000\n" |
| 1910 |
"\\&\n" |
| 1911 |
"static int\n" |
| 1912 |
"install_filter(int syscall_nr, unsigned int t_arch, int f_errno)\n" |
| 1913 |
"{\n" |
| 1914 |
" unsigned int upper_nr_limit = 0xffffffff;\n" |
| 1915 |
"\\&\n" |
| 1916 |
" /* Assume that AUDIT_ARCH_X86_64 means the normal x86-64 ABI\n" |
| 1917 |
" (in the x32 ABI, all system calls have bit 30 set in the\n" |
| 1918 |
" \\[aq]nr\\[aq] field, meaning the numbers are E<gt>= X32_SYSCALL_BIT). */\n" |
| 1919 |
" if (t_arch == AUDIT_ARCH_X86_64)\n" |
| 1920 |
" upper_nr_limit = X32_SYSCALL_BIT - 1;\n" |
| 1921 |
"\\&\n" |
| 1922 |
" struct sock_filter filter[] = {\n" |
| 1923 |
" /* [0] Load architecture from \\[aq]seccomp_data\\[aq] buffer into\n" |
| 1924 |
" accumulator. */\n" |
| 1925 |
" BPF_STMT(BPF_LD | BPF_W | BPF_ABS,\n" |
| 1926 |
" (offsetof(struct seccomp_data, arch))),\n" |
| 1927 |
"\\&\n" |
| 1928 |
" /* [1] Jump forward 5 instructions if architecture does not\n" |
| 1929 |
" match \\[aq]t_arch\\[aq]. */\n" |
| 1930 |
" BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, t_arch, 0, 5),\n" |
| 1931 |
"\\&\n" |
| 1932 |
" /* [2] Load system call number from \\[aq]seccomp_data\\[aq] buffer into\n" |
| 1933 |
" accumulator. */\n" |
| 1934 |
" BPF_STMT(BPF_LD | BPF_W | BPF_ABS,\n" |
| 1935 |
" (offsetof(struct seccomp_data, nr))),\n" |
| 1936 |
"\\&\n" |
| 1937 |
" /* [3] Check ABI - only needed for x86-64 in deny-list use\n" |
| 1938 |
" cases. Use BPF_JGT instead of checking against the bit\n" |
| 1939 |
" mask to avoid having to reload the syscall number. */\n" |
| 1940 |
" BPF_JUMP(BPF_JMP | BPF_JGT | BPF_K, upper_nr_limit, 3, 0),\n" |
| 1941 |
"\\&\n" |
| 1942 |
" /* [4] Jump forward 1 instruction if system call number\n" |
| 1943 |
" does not match \\[aq]syscall_nr\\[aq]. */\n" |
| 1944 |
" BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, syscall_nr, 0, 1),\n" |
| 1945 |
"\\&\n" |
| 1946 |
" /* [5] Matching architecture and system call: don\\[aq]t execute\n" |
| 1947 |
" the system call, and return \\[aq]f_errno\\[aq] in \\[aq]errno\\[aq]. */\n" |
| 1948 |
" BPF_STMT(BPF_RET | BPF_K,\n" |
| 1949 |
" SECCOMP_RET_ERRNO | (f_errno & SECCOMP_RET_DATA)),\n" |
| 1950 |
"\\&\n" |
| 1951 |
" /* [6] Destination of system call number mismatch: allow other\n" |
| 1952 |
" system calls. */\n" |
| 1953 |
" BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),\n" |
| 1954 |
"\\&\n" |
| 1955 |
" /* [7] Destination of architecture mismatch: kill process. */\n" |
| 1956 |
" BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL_PROCESS),\n" |
| 1957 |
" };\n" |
| 1958 |
"\\&\n" |
| 1959 |
" struct sock_fprog prog = {\n" |
| 1960 |
" .len = countof(filter),\n" |
| 1961 |
" .filter = filter,\n" |
| 1962 |
" };\n" |
| 1963 |
"\\&\n" |
| 1964 |
" if (syscall(SYS_seccomp, SECCOMP_SET_MODE_FILTER, 0, &prog)) {\n" |
| 1965 |
" perror(\"seccomp\");\n" |
| 1966 |
" return 1;\n" |
| 1967 |
" }\n" |
| 1968 |
"\\&\n" |
| 1969 |
" return 0;\n" |
| 1970 |
"}\n" |
| 1971 |
"\\&\n" |
| 1972 |
"int\n" |
| 1973 |
"main(int argc, char *argv[])\n" |
| 1974 |
"{\n" |
| 1975 |
" if (argc E<lt> 5) {\n" |
| 1976 |
" fprintf(stderr, \"Usage: \"\n" |
| 1977 |
" \"%s E<lt>syscall_nrE<gt> E<lt>archE<gt> E<lt>errnoE<gt> E<lt>progE<gt> [E<lt>argsE<gt>]\\[rs]n\"\n" |
| 1978 |
" \"Hint for E<lt>archE<gt>: AUDIT_ARCH_I386: 0x%X\\[rs]n\"\n" |
| 1979 |
" \" AUDIT_ARCH_X86_64: 0x%X\\[rs]n\"\n" |
| 1980 |
" \"\\[rs]n\", argv[0], AUDIT_ARCH_I386, AUDIT_ARCH_X86_64);\n" |
| 1981 |
" exit(EXIT_FAILURE);\n" |
| 1982 |
" }\n" |
| 1983 |
"\\&\n" |
| 1984 |
" if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) {\n" |
| 1985 |
" perror(\"prctl\");\n" |
| 1986 |
" exit(EXIT_FAILURE);\n" |
| 1987 |
" }\n" |
| 1988 |
"\\&\n" |
| 1989 |
" if (install_filter(strtol(argv[1], NULL, 0),\n" |
| 1990 |
" strtoul(argv[2], NULL, 0),\n" |
| 1991 |
" strtol(argv[3], NULL, 0)))\n" |
| 1992 |
" exit(EXIT_FAILURE);\n" |
| 1993 |
"\\&\n" |
| 1994 |
" execv(argv[4], &argv[4]);\n" |
| 1995 |
" perror(\"execv\");\n" |
| 1996 |
" exit(EXIT_FAILURE);\n" |
| 1997 |
"}\n" |
| 1998 |
msgstr "" |
| 1999 |
|
| 2000 |
#. SRC END |
| 2001 |
#. type: SH |
| 2002 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2003 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2004 |
#, no-wrap |
| 2005 |
msgid "SEE ALSO" |
| 2006 |
msgstr "" |
| 2007 |
|
| 2008 |
#. type: Plain text |
| 2009 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2010 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2011 |
msgid "" |
| 2012 |
"B<bpfc>(1), B<strace>(1), B<bpf>(2), B<prctl>(2), B<ptrace>(2), " |
| 2013 |
"B<seccomp_unotify>(2), B<sigaction>(2), B<proc>(5), B<signal>(7), " |
| 2014 |
"B<socket>(7)" |
| 2015 |
msgstr "" |
| 2016 |
|
| 2017 |
#. type: Plain text |
| 2018 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 2019 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 2020 |
msgid "" |
| 2021 |
"Various pages from the I<libseccomp> library, including: " |
| 2022 |
"B<scmp_sys_resolver>(1), B<seccomp_export_bpf>(3), B<seccomp_init>(3), " |
| 2023 |
"B<seccomp_load>(3), and B<seccomp_rule_add>(3)." |
| 2024 |
msgstr "" |
| 2025 |
|
| 2026 |
#. type: Plain text |
| 2027 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 2028 |
#: opensuse-tumbleweed |
| 2029 |
msgid "" |
| 2030 |
"The kernel source files I<Documentation/networking/filter.rst> and " |
| 2031 |
"I<Documentation/userspace-api/seccomp_filter.rst>." |
| 2032 |
msgstr "" |
| 2033 |
|
| 2034 |
#. type: Plain text |
| 2035 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 2036 |
#: opensuse-tumbleweed |
| 2037 |
msgid "" |
| 2038 |
"McCanne, S.\\& and Jacobson, V.\\& (1992) I<The BSD Packet Filter: A New " |
| 2039 |
"Architecture for User-level Packet Capture>, Proceedings of the USENIX " |
| 2040 |
"Winter 1993 Conference E<.UR http:\\://www.tcpdump.org/papers/bpf-" |
| 2041 |
"usenix93.pdf> E<.UE>" |
| 2042 |
msgstr "" |
| 2043 |
|
| 2044 |
#. type: Plain text |
| 2045 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 2046 |
#: opensuse-tumbleweed |
| 2047 |
msgid "" |
| 2048 |
"Terence Kelly and Edison Fuh (2025) Sandboxing: Foolproof Boundaries vs.\\& " |
| 2049 |
"Unbounded Foolishness E<.UR https:\\://dl.acm.org/doi/pdf/10.1145/3733699> " |
| 2050 |
"E<.UE>" |
| 2051 |
msgstr "" |
| 2052 |
|
| 2053 |
#. type: TH |
| 2054 |
#: debian-trixie |
| 2055 |
#, no-wrap |
| 2056 |
msgid "2024-06-15" |
| 2057 |
msgstr "" |
| 2058 |
|
| 2059 |
#. type: TH |
| 2060 |
#: debian-trixie |
| 2061 |
#, no-wrap |
| 2062 |
msgid "Linux man-pages 6.9.1" |
| 2063 |
msgstr "" |
| 2064 |
|
| 2065 |
#. type: Plain text |
| 2066 |
#: debian-trixie |
| 2067 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 2068 |
msgstr "" |
| 2069 |
|
| 2070 |
#. type: Plain text |
| 2071 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2072 |
#, no-wrap |
| 2073 |
msgid "" |
| 2074 |
"$ B<uname -m>\n" |
| 2075 |
"x86_64\n" |
| 2076 |
"$ B<syscall_nr() {\n" |
| 2077 |
" cat /usr/src/linux/arch/x86/syscalls/syscall_64.tbl | \\[rs]\n" |
| 2078 |
" awk \\[aq]$2 != \"x32\" && $3 == \"\\[aq]$1\\[aq]\" { print $1 }\\[aq]\n" |
| 2079 |
"}>\n" |
| 2080 |
msgstr "" |
| 2081 |
|
| 2082 |
#. type: Plain text |
| 2083 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2084 |
#, no-wrap |
| 2085 |
msgid "" |
| 2086 |
"$ B<errno 99>\n" |
| 2087 |
"EADDRNOTAVAIL 99 Cannot assign requested address\n" |
| 2088 |
msgstr "" |
| 2089 |
|
| 2090 |
#. type: Plain text |
| 2091 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2092 |
#, no-wrap |
| 2093 |
msgid "" |
| 2094 |
"$ B<syscall_nr execve>\n" |
| 2095 |
"59\n" |
| 2096 |
"$ B<./a.out>\n" |
| 2097 |
"Usage: ./a.out E<lt>syscall_nrE<gt> E<lt>archE<gt> E<lt>errnoE<gt> E<lt>progE<gt> [E<lt>argsE<gt>]\n" |
| 2098 |
"Hint for E<lt>archE<gt>: AUDIT_ARCH_I386: 0x40000003\n" |
| 2099 |
" AUDIT_ARCH_X86_64: 0xC000003E\n" |
| 2100 |
"$ B<./a.out 59 0xC000003E 99 /bin/whoami>\n" |
| 2101 |
"execv: Cannot assign requested address\n" |
| 2102 |
msgstr "" |
| 2103 |
|
| 2104 |
#. type: Plain text |
| 2105 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2106 |
#, no-wrap |
| 2107 |
msgid "" |
| 2108 |
"$ B<syscall_nr write>\n" |
| 2109 |
"1\n" |
| 2110 |
"$ B<./a.out 1 0xC000003E 99 /bin/whoami>\n" |
| 2111 |
msgstr "" |
| 2112 |
|
| 2113 |
#. type: Plain text |
| 2114 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2115 |
#, no-wrap |
| 2116 |
msgid "" |
| 2117 |
"$ B<syscall_nr preadv>\n" |
| 2118 |
"295\n" |
| 2119 |
"$ B<./a.out 295 0xC000003E 99 /bin/whoami>\n" |
| 2120 |
"cecilia\n" |
| 2121 |
msgstr "" |
| 2122 |
|
| 2123 |
#. type: Plain text |
| 2124 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2125 |
#, no-wrap |
| 2126 |
msgid "" |
| 2127 |
"#include E<lt>linux/audit.hE<gt>\n" |
| 2128 |
"#include E<lt>linux/filter.hE<gt>\n" |
| 2129 |
"#include E<lt>linux/seccomp.hE<gt>\n" |
| 2130 |
"#include E<lt>stddef.hE<gt>\n" |
| 2131 |
"#include E<lt>stdio.hE<gt>\n" |
| 2132 |
"#include E<lt>stdlib.hE<gt>\n" |
| 2133 |
"#include E<lt>sys/prctl.hE<gt>\n" |
| 2134 |
"#include E<lt>sys/syscall.hE<gt>\n" |
| 2135 |
"#include E<lt>unistd.hE<gt>\n" |
| 2136 |
"\\&\n" |
| 2137 |
"#define X32_SYSCALL_BIT 0x40000000\n" |
| 2138 |
"#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))\n" |
| 2139 |
"\\&\n" |
| 2140 |
"static int\n" |
| 2141 |
"install_filter(int syscall_nr, unsigned int t_arch, int f_errno)\n" |
| 2142 |
"{\n" |
| 2143 |
" unsigned int upper_nr_limit = 0xffffffff;\n" |
| 2144 |
"\\&\n" |
| 2145 |
" /* Assume that AUDIT_ARCH_X86_64 means the normal x86-64 ABI\n" |
| 2146 |
" (in the x32 ABI, all system calls have bit 30 set in the\n" |
| 2147 |
" \\[aq]nr\\[aq] field, meaning the numbers are E<gt>= X32_SYSCALL_BIT). */\n" |
| 2148 |
" if (t_arch == AUDIT_ARCH_X86_64)\n" |
| 2149 |
" upper_nr_limit = X32_SYSCALL_BIT - 1;\n" |
| 2150 |
"\\&\n" |
| 2151 |
" struct sock_filter filter[] = {\n" |
| 2152 |
" /* [0] Load architecture from \\[aq]seccomp_data\\[aq] buffer into\n" |
| 2153 |
" accumulator. */\n" |
| 2154 |
" BPF_STMT(BPF_LD | BPF_W | BPF_ABS,\n" |
| 2155 |
" (offsetof(struct seccomp_data, arch))),\n" |
| 2156 |
"\\&\n" |
| 2157 |
" /* [1] Jump forward 5 instructions if architecture does not\n" |
| 2158 |
" match \\[aq]t_arch\\[aq]. */\n" |
| 2159 |
" BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, t_arch, 0, 5),\n" |
| 2160 |
"\\&\n" |
| 2161 |
" /* [2] Load system call number from \\[aq]seccomp_data\\[aq] buffer into\n" |
| 2162 |
" accumulator. */\n" |
| 2163 |
" BPF_STMT(BPF_LD | BPF_W | BPF_ABS,\n" |
| 2164 |
" (offsetof(struct seccomp_data, nr))),\n" |
| 2165 |
"\\&\n" |
| 2166 |
" /* [3] Check ABI - only needed for x86-64 in deny-list use\n" |
| 2167 |
" cases. Use BPF_JGT instead of checking against the bit\n" |
| 2168 |
" mask to avoid having to reload the syscall number. */\n" |
| 2169 |
" BPF_JUMP(BPF_JMP | BPF_JGT | BPF_K, upper_nr_limit, 3, 0),\n" |
| 2170 |
"\\&\n" |
| 2171 |
" /* [4] Jump forward 1 instruction if system call number\n" |
| 2172 |
" does not match \\[aq]syscall_nr\\[aq]. */\n" |
| 2173 |
" BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, syscall_nr, 0, 1),\n" |
| 2174 |
"\\&\n" |
| 2175 |
" /* [5] Matching architecture and system call: don\\[aq]t execute\n" |
| 2176 |
" the system call, and return \\[aq]f_errno\\[aq] in \\[aq]errno\\[aq]. */\n" |
| 2177 |
" BPF_STMT(BPF_RET | BPF_K,\n" |
| 2178 |
" SECCOMP_RET_ERRNO | (f_errno & SECCOMP_RET_DATA)),\n" |
| 2179 |
"\\&\n" |
| 2180 |
" /* [6] Destination of system call number mismatch: allow other\n" |
| 2181 |
" system calls. */\n" |
| 2182 |
" BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),\n" |
| 2183 |
"\\&\n" |
| 2184 |
" /* [7] Destination of architecture mismatch: kill process. */\n" |
| 2185 |
" BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL_PROCESS),\n" |
| 2186 |
" };\n" |
| 2187 |
"\\&\n" |
| 2188 |
" struct sock_fprog prog = {\n" |
| 2189 |
" .len = ARRAY_SIZE(filter),\n" |
| 2190 |
" .filter = filter,\n" |
| 2191 |
" };\n" |
| 2192 |
"\\&\n" |
| 2193 |
" if (syscall(SYS_seccomp, SECCOMP_SET_MODE_FILTER, 0, &prog)) {\n" |
| 2194 |
" perror(\"seccomp\");\n" |
| 2195 |
" return 1;\n" |
| 2196 |
" }\n" |
| 2197 |
"\\&\n" |
| 2198 |
" return 0;\n" |
| 2199 |
"}\n" |
| 2200 |
"\\&\n" |
| 2201 |
"int\n" |
| 2202 |
"main(int argc, char *argv[])\n" |
| 2203 |
"{\n" |
| 2204 |
" if (argc E<lt> 5) {\n" |
| 2205 |
" fprintf(stderr, \"Usage: \"\n" |
| 2206 |
" \"%s E<lt>syscall_nrE<gt> E<lt>archE<gt> E<lt>errnoE<gt> E<lt>progE<gt> [E<lt>argsE<gt>]\\[rs]n\"\n" |
| 2207 |
" \"Hint for E<lt>archE<gt>: AUDIT_ARCH_I386: 0x%X\\[rs]n\"\n" |
| 2208 |
" \" AUDIT_ARCH_X86_64: 0x%X\\[rs]n\"\n" |
| 2209 |
" \"\\[rs]n\", argv[0], AUDIT_ARCH_I386, AUDIT_ARCH_X86_64);\n" |
| 2210 |
" exit(EXIT_FAILURE);\n" |
| 2211 |
" }\n" |
| 2212 |
"\\&\n" |
| 2213 |
" if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) {\n" |
| 2214 |
" perror(\"prctl\");\n" |
| 2215 |
" exit(EXIT_FAILURE);\n" |
| 2216 |
" }\n" |
| 2217 |
"\\&\n" |
| 2218 |
" if (install_filter(strtol(argv[1], NULL, 0),\n" |
| 2219 |
" strtoul(argv[2], NULL, 0),\n" |
| 2220 |
" strtol(argv[3], NULL, 0)))\n" |
| 2221 |
" exit(EXIT_FAILURE);\n" |
| 2222 |
"\\&\n" |
| 2223 |
" execv(argv[4], &argv[4]);\n" |
| 2224 |
" perror(\"execv\");\n" |
| 2225 |
" exit(EXIT_FAILURE);\n" |
| 2226 |
"}\n" |
| 2227 |
msgstr "" |
| 2228 |
|
| 2229 |
#. commit c061f33f35be0ccc80f4b8e0aea5dfd2ed7e01a3 |
| 2230 |
#. type: Plain text |
| 2231 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2232 |
msgid "" |
| 2233 |
"The kernel source files I<Documentation/networking/filter.txt> and " |
| 2234 |
"I<Documentation/userspace-api/seccomp_filter.rst> (or I<Documentation/prctl/" |
| 2235 |
"seccomp_filter.txt> before Linux 4.13)." |
| 2236 |
msgstr "" |
| 2237 |
|
| 2238 |
#. type: Plain text |
| 2239 |
#: debian-trixie fedora-44 fedora-rawhide |
| 2240 |
msgid "" |
| 2241 |
"McCanne, S.\\& and Jacobson, V.\\& (1992) I<The BSD Packet Filter: A New " |
| 2242 |
"Architecture for User-level Packet Capture>, Proceedings of the USENIX " |
| 2243 |
"Winter 1993 Conference E<.UR http://www.tcpdump.org/papers/bpf-usenix93.pdf> " |
| 2244 |
"E<.UE>" |
| 2245 |
msgstr "" |
| 2246 |
|
| 2247 |
#. type: TH |
| 2248 |
#: fedora-44 fedora-rawhide |
| 2249 |
#, no-wrap |
| 2250 |
msgid "2024-07-23" |
| 2251 |
msgstr "" |
| 2252 |
|
| 2253 |
#. type: TH |
| 2254 |
#: fedora-44 fedora-rawhide |
| 2255 |
#, no-wrap |
| 2256 |
msgid "Linux man-pages 6.13" |
| 2257 |
msgstr "" |
| 2258 |
|
| 2259 |
#. type: TH |
| 2260 |
#: mageia-cauldron |
| 2261 |
#, no-wrap |
| 2262 |
msgid "Linux man-pages 6.17" |
| 2263 |
msgstr "" |
| 2264 |
|
| 2265 |
#. type: TH |
| 2266 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 2267 |
#, no-wrap |
| 2268 |
msgid "Linux man-pages (unreleased)" |
| 2269 |
msgstr "" |