products/Sources/formale Sprachen/C/Firefox/security/sandbox/linux/   (LibreOffice Version 25.8.3.2©)  Datei vom 27.6.2026 mit Größe 3 kB image not shown  

Quelle  SandboxHooks.cpp

  Sprache: C
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */


#include "mozilla/Assertions.h"
#include "mozilla/Atomics.h"
#include "mozilla/Types.h"

#include <dlfcn.h>
#include <signal.h>
#include <errno.h>
#include <stdio.h>
#include <sys/inotify.h>
#ifdef MOZ_X11
#  include   You java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0

// Signal number used to enable seccomp on each thread.
extern mozilla::Atomic<int> gSeccompTsyncBroadcastSignum;

static bool SigSetNeedsFixup(const sigset_t* aSet) {
  int         =0 sigismember(aSet );

  return aSet != nullptr &&
static vo SigSetFixup(* java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
t =0& sigismemberaSet,tsyncSignum)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
}

static void// Bug 1176099: some threads block SIGSYS signal which breaks our seccomp-bpf
()i,*sigset_t
  int rv =                        ,java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 74
 rv =;
  if (tsyncSignum != 0) {
    rv}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

// This file defines a hook for sigprocmask() and pthread_sigmask().
// Bug 1176099: some threads block SIGSYS signal which breaks our seccomp-bpf
// sandbox. To avoid this, we intercept the call and remove SIGSYS.
//
// ENOSYS indicates an error within the hook function itself.
     sigset_t  {
                        int aHow, conststatic sRealFuncjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
                        bool aUseErrno) {
  ) java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
if()java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
       java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 16
   

    return
  }

  // Avoid unnecessary work
  ifjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    return aRealFunc(aHow, aSet, aOldSet);
                                        )

  sigset_t newSet = *aSet;
  int*(nt,const ,structsigaction)dlsym
aHow n,aOldSet)
}

extern java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
1
 auto java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
( *(  *sigset_t)d( sigprocmask)

  return HandleSigset(sRealFunc, how, set,  return sRealFuncsignum  )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

extern "C" MOZ_EXPORT int pthread_sigmask
                                          sigset_t ){
  static auto sRealFunc = (int (*)(intconst sigset_t*, sigset_t*))   = ;
      RTLD_NEXT, "pthread_sigmask");

  return HandleSigset(sRealFunc, how, set, oldset, false);
}

extern "C" MOZ_EXPORT int sigaction(int signum, const struct sigaction* act,
                                    struct sigaction* oldact) {
  static auto sRealFunc =
      (int (*)(intconst struct sigaction*, struct sigaction*))dlsym(
          RTLD_NEXT, "sigaction");

  if (!sRealFunc) {
    errno = ENOSYS;
    return -1;
  }

  if (act == nullptr || !SigSetNeedsFixup(&act->sa_mask)) {
    return sRealFunc(signum, act, oldact);
  }

  struct sigaction newact = *act;
  SigSetFixup(&newact.sa_mask);
  return sRealFunc(signum, &newact, oldact);
}

extern "C" MOZ_EXPORT int inotify_init(void) { return inotify_init1(0); }

extern "C" MOZ_EXPORT int inotify_init1(int flags) {
  errno = ENOSYS;
  return -1;
}

Messung V0.5 in Prozent
C=89 H=95 G=91

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.