導入モード
Implementation
適用可能なプラットフォーム
言語
クラス: Not Language-Specific (Undetermined)
名前: C (Undetermined)
一般的な結果
| スコープ |
影響 |
可能性 |
Integrity Confidentiality Availability | DoS: Crash, Exit, or Restart, Execute Unauthorized Code or Commands
注記:The most common consequence will be a corruption of the state of the product, possibly leading to a crash or exit. However, if the signal handler is operating on state variables for security relevant libraries or protection mechanisms, the consequences can be far more severe, including protection mechanism bypass, privilege escalation, or information exposure. | |
観察された例
| 参考文献 |
説明 |
| Signal handler uses functions that ultimately call the unsafe syslog/malloc/s*printf, leading to denial of service via multiple login attempts |
| Chain: Signal handler contains too much functionality (CWE-828), introducing a race condition (CWE-362) that leads to a double free (CWE-415). |
| unsafe calls to library functions from signal handler |
| SIGURG can be used to remotely interrupt signal handler; other variants exist. |
| SIGCHLD signal to FTP server can cause crash under heavy load while executing non-reentrant functions like malloc/free. |
| SIGCHLD not blocked in a daemon loop while counter is modified, causing counter to get out of sync. |
潜在的な緩和策
Phases : Implementation // Architecture and Design
Phases : Implementation
Where non-reentrant functionality must be leveraged within a signal handler, be sure to block or mask signals appropriately. This includes blocking other signals within the signal handler itself that may also leverage the functionality. It also includes blocking all signals reliant upon the functionality when it is being accessed or modified by the normal behaviors of the product.
検出方法
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
脆弱性マッピングノート
理由 : This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
コメント : Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
参考文献
REF-360
Delivering Signals for Fun and Profit
Michal Zalewski.
https://lcamtuf.coredump.cx/signals.txt REF-361
Race Condition: Signal Handling
https://vulncat.fortify.com/en/detail?id=desc.structural.cpp.race_condition_signal_handling#:~:text=Signal%20handling%20race%20conditions%20can,installed%20to%20handle%20multiple%20signals.s
登録情報
| 名前 |
組織 |
日付 |
リリース日 |
Version |
| CWE Content Team |
MITRE |
2010-11-08 +00:00 |
2010-12-13 +00:00 |
1.11 |
変更履歴
| 名前 |
組織 |
日付 |
コメント |
| CWE Content Team |
MITRE |
2011-06-01 +00:00 |
updated Common_Consequences |
| CWE Content Team |
MITRE |
2012-05-11 +00:00 |
updated Demonstrative_Examples |
| CWE Content Team |
MITRE |
2014-06-23 +00:00 |
updated Demonstrative_Examples, References |
| CWE Content Team |
MITRE |
2017-11-08 +00:00 |
updated Observed_Examples |
| CWE Content Team |
MITRE |
2020-02-24 +00:00 |
updated Relationships |
| CWE Content Team |
MITRE |
2021-03-15 +00:00 |
updated Demonstrative_Examples |
| CWE Content Team |
MITRE |
2022-04-28 +00:00 |
updated Observed_Examples |
| CWE Content Team |
MITRE |
2023-01-31 +00:00 |
updated Common_Consequences, Description, Potential_Mitigations |
| CWE Content Team |
MITRE |
2023-04-27 +00:00 |
updated References, Relationships, Type |
| CWE Content Team |
MITRE |
2023-06-29 +00:00 |
updated Mapping_Notes |
| CWE Content Team |
MITRE |
2025-12-11 +00:00 |
updated Applicable_Platforms, Detection_Factors, Time_of_Introduction, Weakness_Ordinalities |