[SECURITY] HS EventMon uses forged event payload identity to trigger processor reset
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- c
- Lĩnh vực
- embedded-iot, security
Hướng nghiên cứu
Bắt đầu với các điểm quyết định trong src/apps/hs/fsw/src/hs_monitors.c, sau đó lần theo luồng sự kiện đi qua hs_app.c và hs_cmds.c để xác định liệu có sẵn siêu dữ liệu người gửi đáng tin cậy hay không. Tái hiện kịch bản CFE_EVS_LONG_EVENT_MSG_MID giả mạo trong deployment native_std; hoàn tất khi chỉ riêng danh tính được khai báo trong payload không còn có thể kích hoạt các hành động EventMon đặc quyền.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Checklist (Please check before submitting)
- I reviewed the Contributing Guide.
- I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.
Describe the bug
HS EventMon trusts the AppName and EventID fields embedded in incoming CFE_EVS_LONG_EVENT_MSG_MID packets, but it does not verify that the software-bus message actually originated from that named application. When a matching EventMon rule is configured, HS will execute privileged actions such as processor reset, app restart, or app deletion based only on spoofable payload identity.
In the reproduced native_std sample deployment, this is not a purely theoretical code issue. I reproduced an end-to-end chain where:
- attacker-controlled data was delivered through the normal UDP command-ingest path,
- CF/CFDP retained an attacker-controlled
HS.EventMon_Tblfile on the target runtime filesystem, - the normal
CFE_TBLmanagement path loaded and activated that table, and - a forged
CFE_EVS_LONG_EVENT_MSG_MIDpacket causedHSto executeCFE_ES_ResetCFE()and reset the processor.
To Reproduce
- Run the standard
native_stdsample deployment and startcore-cpu1. - Deliver a crafted
hs_emt_visa22.tblover the normalUDP -> CI_LAB -> CF/CFDPpath so that CF retains it as/cf/hs_emt_visa22.tbl. - Send normal
CFE_TBLcommands to:- abort any stale load state,
- load
/cf/hs_emt_visa22.tbl, - validate the inactive buffer, and
- activate
HS.EventMon_Tbl.
- Send the normal
HS EnableEventMoncommand. - Inject a forged
CFE_EVS_LONG_EVENT_MSG_MIDpacket whose payload sets:AppName = CFE_TIMEEventID = 0x2222
- Observe that
HSmatches the spoofed payload fields and performs a processor reset.
Observed runtime evidence from reproduction:
CF R2(4:8756): successfully retained file as /cf/hs_emt_visa22.tbl
HS 52: EventMon verify results: good = 1, bad = 0, unused = 15
CFE_TBL 36: HS validation successful for inactive 'HS.EventMon_Tbl'
CFE_TBL 37: HS Successfully Updated 'HS.EventMon_Tbl'
HS 27: Event Monitoring Enabled
HS 45: Event Monitor: APP:(CFE_TIME) EID:(8738): Action: Processor Reset
CFE_ES_ResetCFE: POWER ON RESET due to max proc resets (Commanded).
CFE_PSP: Exiting cFE with POWERON Reset status.
Expected behavior
HS should not make EventMon authorization decisions based solely on payload-declared identity. Before executing privileged actions, it should verify a trusted sender identity provided by the framework or reject externally supplied event traffic that lacks authenticated origin metadata.
Code snips
Primary decision point:
Event ingress path:
Relevant matching logic:
if ((ActionType != HS_EMTActType_NOACT)
&& (HS_AppData.EMTablePtr[TableIndex].EventID == EventPtr->Payload.PacketID.EventID))
{
if (strncmp(HS_AppData.EMTablePtr[TableIndex].AppName,
EventPtr->Payload.PacketID.AppName,
OS_MAX_API_NAME) == 0)
{
switch (ActionType)
{
case HS_EMTActType_PROC_RESET:
CFE_ES_ResetCFE(CFE_PSP_RST_TYPE_PROCESSOR);
Normal remote file-ingress prerequisite used in reproduction:
System observed on:
- Hardware: containerized native sample deployment
- OS: Linux (containerized native target)
- Versions: cFS sample deployment built from this repository using
build-native_std; cFE/OSAL/PSP sample stack as shipped in-tree
Additional context
Important scope note: this reproduced exploitability depends on deployment-specific reachability. In my reproduction, the sample deployment exposed a normal UDP ingest path through CI_LAB, and CF/CFDP could retain a remotely supplied table file to writable storage. If a mission removes or protects those paths, the attack surface changes.
This reproduction did not rely on manually placing files inside the target runtime filesystem and did not call internal APIs directly. The malicious EMT file was delivered through the system's normal ingress path, activated through the normal CFE_TBL management path, and the forged event was injected through the same sample deployment's normal message-ingest surface.
Another scope note: in the reproduced setup, the packet sender and core-cpu1 were run within the same container/network namespace and traffic was sent to 127.0.0.1:1234. Therefore, this demonstrates that the shipped sample deployment's normal network-ingest surface can be abused to trigger privileged HS actions, but it should not be overstated as proof that every real mission exposes the same surface directly to an external network.
Suggested fix:
- bind
HSEventMon decisions to authenticated sender identity, not payload-declared app name; - reject or quarantine externally supplied event packets that are not emitted by trusted EVS-originated paths;
- if EVS-origin metadata exists or can be added, require
HSto compare against that trusted sender identity before executing privileged actions.
Proposed severity view:
- This is best described as a real authorization/trust-boundary failure with deployment-conditional network reachability.
- In the reproduced sample deployment, it results in a visible processor reset with no need to compromise the named victim app whose identity is spoofed.
- A CVSS v3.1 base score around
8.8is defensible for the reproduced sample deployment (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H) if the report text keeps the deployment-prerequisite caveat. - In my view this is CVE-worthy because the vulnerable behavior is not simply “HS can reset on events”; the issue is that
HSauthorizes those privileged actions using spoofable payload identity instead of trusted sender identity, and that weakness is dynamically exploitable in the shipped sample deployment.
Reporter Info
Prepared draft based on local reproduction and source review.
- Ngôn ngữ chính
- C
- Star
- 1.6k
- Fork
- 421
- Merge trung bình
- 1 ngày 42 phút
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nasa/cFS
-
[SECURITY] Off-by-one bounds check in SBN HKPeerCmd/HKNetCmd allows access to invalid net/peer slotsCó thể đã có người làm @0x000NULL đã nhận 37 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Update Workflow READMEĐang mởcontinuous-integration
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[SECURITY] Missing length validation for CFE_EVS_SEND_HK_MID in EVS ProcessCommandPacketCó thể đã có người làm @linerfan5114 đã nhận 204 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[SECURITY] Missing length validation for CFE_ES_SEND_HK_MID in ES TaskPipeCó thể đã có người làm @linerfan5114 đã nhận 204 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
ESPresense/ESPresense#2680 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenPrinting/cups#1828 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ImageMagick/ImageMagick#9134 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Builder: a structure opened without calculation data shows the Diffraction (fibre) view by defaultĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
FriendsofECCE/ECCE#1245 · 1 bình luận ·
-
Arch: ARM/AArch64 Doc
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
RT-Thread/rt-thread#12082 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày