この製品は、再入可能でない関数を呼び出すシグナル・ハンドラを定義している。
非再入可能関数とは、メモリ破壊を引き起こすことなく、安全に呼び出し、中断し、最初の呼び出しが終了する前に呼び出すことができない関数のことです。これは、予期しないシステム状態や予期しない結果につながる可能性があり、サービス拒否やコード実行など、コンテキストに応じて様々な潜在的結果をもたらします。
多くの関数はリエントラントではありませんが、シグナル・ハンドラで使用されるとメモリ破壊を引き起こすものもあります。関数コールsyslog()はこの例である。その機能を実行するために、syslog()は少量のメモリを "スクラッチ領域 "として確保する。syslog()がシグナル呼 び出しによって中断され、シグナル・ハンドラがsyslog()を呼び出すと、これらの関 数が使用するメモリは未定義の状態になり、悪用される可能性がある。malloc()とfree()の実装は、どのメモリが割り当てられ、どのメモリが利用可能かを追跡するために、グローバル構造体のメタデータを管理するが、再入可能性はない。これらの関数を同時に呼び出すと、メタデータが破壊される可能性がある。
The product defines a signal handler that calls a non-reentrant function.
Non-reentrant functions are functions that cannot safely be called, interrupted, and then recalled before the first call has finished without resulting in memory corruption. This can lead to an unexpected system state and unpredictable results with a variety of potential consequences depending on context, including denial of service and code execution.
Many functions are not reentrant, but some of them can result in the corruption of memory if they are used in a signal handler. The function call syslog() is an example of this. In order to perform its functionality, it allocates a small amount of memory as "scratch space." If syslog() is suspended by a signal call and the signal handler calls syslog(), the memory used by both of these functions enters an undefined, and possibly, exploitable state. Implementations of malloc() and free() manage metadata in global structures in order to track which memory is allocated versus which memory is available, but they are non-reentrant. Simultaneous calls to these functions can cause corruption of the metadata.