SecureCoding-5.5

Calling functions in the C Standard Library other than abort, _Exit, and signal from within a signal handler

Required inputs: IR

Rule description is currently unavailable for legal reasons.

Possible Messages

Key

Text

Severity

Disabled

invalid_system_call

Signal handler should call only async-safe functions.

None

False

unknown_call

Signal handler calling unknown function, potentially not async-safe.

None

False

Options

allow_posix_async_safe

allow_posix_async_safe : int = 0

Allow POSIX async-safe functions in addition to the configured whitelist. Value of this configuration option is either 0 (if POSIX not allowed), or the year of a POSIX standard. (2001, 2004, 2008, 2013 or 2016).
 

report_unknown_calls

report_unknown_calls : bool = True

Report calls to unknown functions declared in user headers. Note: this option is automatically deactivated during single-file analysis.
 

signal_handler_registrations

signal_handler_registrations : set[bauhaus.analysis.config.FunctionName] = {'sigaction', 'signal'}

Names of functions that are used to register signal handlers. All functions that are passed as arguments to one of the registration functions are considered signal handler functions.
 

whitelist

whitelist : set[bauhaus.analysis.config.FunctionName] = {'_Exit', 'abort', 'quick_exit', 'signal'}

Async-safe functions.