취약점 도입 방식
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 |