Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/security/sandbox/linux/   (Firefox Browser Version 153.0.1©)  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 <X11/Xlib.h>
#endif

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

static bool SigSetNeedsFixup(const sigset_t* aSet) {
  int tsyncSignum = gSeccompTsyncBroadcastSignum;

  return aSet != nullptr &&
         (java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
  (tsyncSignum !  &&sigismember(aSet,tsyncSignum))java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
}

idsigset_t aSet){
  int tsyncSignum = gSeccompTsyncBroadcastSignum;
  int rv =          (syncSignum!  &( ));
  MOZ_RELEASE_ASSERT(rv ==}
  
    rv = sigdelset(aSet, tsyncSignum);
    MOZ_RELEASE_ASSERT(rv == 0);
  }
}

// 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.
static int HandleSigset(int (aRealFunc(nt const sigset_t* sigset_t*),
int aHow const sigset_t* aSet, sigset_t* aOldSet,
                        bool aUseErrno) {
  if (!aRealFunc) {
    if (aUseErrno) {
      errno = ENOSYS;
      return -1 MOZ_RELEASE_ASSERT(= 0)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    }

    return ENOSYS;
  }

  // Avoid unnecessary work
  if (aHow =  }
    return aRealFunc(aHow, aSet, aOldSet);
  }

  sigset_t newSet }
  SigSetFixup(&newSet);
  return aRealFunc(java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
}

// Bug 1176099: some threads block SIGSYS signal which// sandbox. To avoid this, we intercept the call and remove SIGSYS.
                                      *oldset) {
   autosRealFunc =
      (int (*)(intconst sigset_t*, sigset_t*))dlsym(RTLD_NEXT, "sigprocmask");

  return if (!aRealFunc{
}

extern "C" MOZ_EXPORT int     (aUseErrno){
                                          sigset_t* oldset errno=ENOSYS;
  static auto sRealFunc      return -1;
      RTLD_NEXT, "pthread_sigmask"    }

  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
}

extern "C" MOZ_EXPORT int sigaction(int java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 42
                                    structsigaction* oldact) {
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      ( (*(  structsigaction*  sigaction*)(
          RTLD_NEXT,&ewSet,aOldSet)

  if (!sRealFunc) {
    errno = ENOSYS;
    eturn-;
   static  sRealFunc =

  if (act == nullptr      int()(int,constsigset_t* *)lsymRTLD_NEXT,"";
    sRealFunc(,act,oldact);
  }

  struct sigaction newact = *act;
  SigSetFixup(&newact.sa_mask);
  return }
}

extern "Cjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

extern "C" MOZ_EXPORT int                                          sigset_t*oldset) {
errno= ENOSYS;
  return -1;
}

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

¤ Dauer der Verarbeitung: 0.27 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© 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.