nasa / nasa/ci_lab

Overrun for CFE_MSG_Message_t

Open
#97 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
29
Forks
50
Avg merge
1d 4h
Merged PRs (30d)
1

Description

Describe the bug
Out-of-bounds access (OVERRUN). Overrunning struct type CFE_MSG_Message_t of 16 bytes by passing it to a function which accesses it at byte offset 39 using argument 40UL.

Expected behavior
Fix overrun

Code snips
https://github.com/nasa/ci_lab/blob/12b8cdd5cc8945fe4dfd4423e57f48114f1948d8/fsw/src/ci_lab_app.c#L189

System observed on:
Coverity: https://scan.coverity.com/projects/arielsadamsnasa-cfs-jsf-rules?tab=overview

Reporter Info
Ariel Adams, ASRC Federal

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at fsw/src/ci_lab_app.c line 189 and review the Coverity report for the CFE_MSG_Message_t access. Trace why the 16-byte struct is passed to a function using byte offset 39 with argument 40UL. Done means the out-of-bounds access is removed and the Coverity overrun finding is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.