JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.

If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.

If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.

CodeSonar® 9.2p0 CONFIDENTIAL CodeSecure Inc
C and C++
Binaries


BADFUNC.SIGNAL : Use of signal

Summary

A use of signal(), which requires that certain precautions be taken.

Properties

Class Name Use of signal
Significance security
Mnemonic BADFUNC.SIGNAL
Categories
AUTOSARC++14 AUTOSARC++14:M18-7-1 The signal handling facilities of <csignal> shall not be used.
MisraC++2008 MisraC++2008:18-7-1 The signal handling facilities of <csignal> shall not be used.
MisraC++2023 MisraC++2023:21.10.3 The facilities provided by the standard header file <csignal> shall not be used
CWE CWE:676 Use of Potentially Dangerous Function
TS17961 TS17961:5.3-accsig Accessing shared objects in signal handlers
  TS17961:5.5-asyncsig Calling functions in the C Standard Library other than abort, _Exit, and signal from within a signal handler
  TS17961:5.7-sigcall Calling signal from interruptible signal handlers
CERT-C CERT-C:CON37-C Do not call signal() in a multithreaded program
  CERT-C:SIG00-C Mask signals handled by noninterruptible signal handlers
  CERT-C:SIG01-C Understand implementation-specific details regarding signal handler persistence
  CERT-C:SIG02-C Avoid using signals to implement normal functionality
  CERT-C:SIG30-C Call only asynchronous-safe functions within signal handlers
  CERT-C:SIG34-C Do not call signal() from within interruptible signal handlers
BSI BSI:SIGNAL-01 Use of signal
OWASP-2021 OWASP-2021:A4 Insecure design
OWASP-2025 OWASP-2025:A06 Insecure Design
Availability Available for C and C++.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Use of signal"
To enable all BSI-related classes, including all BSI-specific BADFUNC classes, use the bsi configuration preset.

Resolution

Avoid the use of signals.

Alternatively, when you see a Use of signal warning, make sure that you have taken steps to eliminate overlap between signal handler calls (including multiple calls to the same signal handler), ensure that signals are not running at a higher privilege level than necessary, and warn the developer when signals occur (including information about the signal handler). If so, you can change the warning state to Suppressed.

Relevant Configuration File Parameters

This class is implemented using a BAD_FUNCTION_* rule set in the general template configuration file.

The following configuration file parameters affect checks for this warning class.

 

To report problems with this documentation, please visit https://support.codesecure.com/.