Mode Pengenalan
Implementation
Platform yang Berlaku
Bahasa
Kelas: Not Language-Specific (Undetermined)
Nama: C (Undetermined)
Konsekuensi Umum
| Cakupan |
Dampak |
Kemungkinan |
Integrity Confidentiality Availability | DoS: Crash, Exit, or Restart, Execute Unauthorized Code or Commands
Catatan: 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. | |
Contoh yang Diamati
| Referensi |
Deskripsi |
| 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. |
Mitigasi yang Memungkinkan
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.
Metode Deteksi
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.)
Catatan Pemetaan Kerentanan
Justifikasi : 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.
Komentar : 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.
Referensi
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
Pengajuan
| Nama |
Organisasi |
Tanggal |
Tanggal rilis |
Version |
| CWE Content Team |
MITRE |
2010-11-08 +00:00 |
2010-12-13 +00:00 |
1.11 |
Modifikasi
| Nama |
Organisasi |
Tanggal |
Komentar |
| 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 |