CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')

CWE-843 là gì?

MITRE CWE

The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.

Xác minh để phân tích mục CWE này

Bước xác minh ngắn giúp bảo vệ nguồn dữ liệu chính thức và hạn chế việc gọi AI tự động.

Định nghĩa MITRE gốc (tiếng Anh)

MITRE CWE

The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.

When the product accesses the resource using an incompatible type, this could trigger logical errors because the resource does not have expected properties. In languages without memory safety, such as C and C++, type confusion can lead to out-of-bounds memory access. While this weakness is frequently associated with unions when parsing data with many different embedded object types in C, it can be present in any application that can interpret the same variable or memory location in multiple ways. This weakness is not unique to C and C++. For example, errors in PHP applications can be triggered by providing array parameters when scalars are expected, or vice versa. Languages such as Perl, which perform automatic conversion of a variable of one type when it is accessed as if it were another type, can also contain these issues.

Mô tả chi tiết

CyStack đang phân tích mục CWE này. Trang sẽ tự động cập nhật khi bản phân tích song ngữ hoàn tất.

Đặc điểm

CyStack đang phân tích mục CWE này. Trang sẽ tự động cập nhật khi bản phân tích song ngữ hoàn tất.

Giai đoạn hình thành

  • Hiện thực hóa

Tác động thường gặp

CyStack đang phân tích mục CWE này. Trang sẽ tự động cập nhật khi bản phân tích song ngữ hoàn tất.
  • Tính sẵn sàng, Tính toàn vẹn, Tính bí mật

    Đọc bộ nhớ, Thay đổi bộ nhớ, Thực thi mã hoặc lệnh trái phép, Từ chối dịch vụ: sập, thoát hoặc khởi động lại

Biện pháp giảm thiểu

CyStack đang phân tích mục CWE này. Trang sẽ tự động cập nhật khi bản phân tích song ngữ hoàn tất.

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

CyStack đang phân tích mục CWE này. Trang sẽ tự động cập nhật khi bản phân tích song ngữ hoàn tất.
  • Phân tích tĩnh tự độngHiệu quả: Cao

Lỗ hổng điển hình

CyStack đang phân tích mục CWE này. Trang sẽ tự động cập nhật khi bản phân tích song ngữ hoàn tất.

Các ví dụ này chỉ minh họa cho mục CWE, không phải danh sách đầy đủ mọi lỗ hổng liên quan.

Nguồn và tài liệu tham khảo

Tham chiếu

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Tìm hiểu thêm

Kiểm tra chuyên sâu cùng giải pháp quản lý rủi ro Web toàn diện

Giải pháp CyStack VulnScan liên tục phát hiện tài sản, xác minh lỗ hổng và giúp đội ngũ bảo mật ưu tiên khắc phục cho toàn bộ doanh nghiệp.

Khám phá CyStack VulnScan
CyStack VulnScan dashboard