Chi tiết CWE-828

CWE-828

Signal Handler with Functionality that is not Asynchronous-Safe
2010-12-13
00h00 +00:00
Incomplete
2025-12-11
00h00 +00:00
Thông báo cho một CWE
Luôn được thông báo về mọi thay đổi đối với một CWE cụ thể.
Quản lý thông báo

Tên: Signal Handler with Functionality that is not Asynchronous-Safe

The product defines a signal handler that contains code sequences that are not asynchronous-safe, i.e., the functionality is not reentrant, or it can be interrupted.

Thông tin chung

Các cách xuất hiện

Implementation

Nền tảng áp dụng

Ngôn ngữ

Lớp: Not Language-Specific (Undetermined)
Tên: C (Undetermined)

Hậu quả phổ biến

Phạm vi Tác động Khả năng xảy ra
Integrity
Confidentiality
Availability
DoS: Crash, Exit, or Restart, Execute Unauthorized Code or Commands

Ghi chú: 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.

Ví dụ đã quan sát

Tài liệu tham khảo Mô tả

CVE-2008-4109

Signal handler uses functions that ultimately call the unsafe syslog/malloc/s*printf, leading to denial of service via multiple login attempts

CVE-2006-5051

Chain: Signal handler contains too much functionality (CWE-828), introducing a race condition (CWE-362) that leads to a double free (CWE-415).

CVE-2001-1349

unsafe calls to library functions from signal handler

CVE-2004-0794

SIGURG can be used to remotely interrupt signal handler; other variants exist.

CVE-2004-2259

SIGCHLD signal to FTP server can cause crash under heavy load while executing non-reentrant functions like malloc/free.

CVE-2002-1563

SIGCHLD not blocked in a daemon loop while counter is modified, causing counter to get out of sync.

Các biện pháp giảm thiểu tiềm năng

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.

Phương pháp phát hiện

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.)

Ghi chú ánh xạ lỗ hổng

Lý do : 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.
Bình luận : 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.

Tài liệu tham khảo

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

Gửi

Tên Tổ chức Ngày Ngày phát hành Version
CWE Content Team MITRE 2010-11-08 +00:00 2010-12-13 +00:00 1.11

Sửa đổi

Tên Tổ chức Ngày Bình luận
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