Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overrun warning false alarms in to_lab_app.c #108

Open
ArielSAdamsNASA opened this issue Oct 6, 2021 · 1 comment
Open

Overrun warning false alarms in to_lab_app.c #108

ArielSAdamsNASA opened this issue Oct 6, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@ArielSAdamsNASA
Copy link

Describe the bug
Out-of-bounds access (OVERRUN) in to_lab_app.c

Expected behavior
Fix overruns

Code snips
Overrunning struct type CFE_MSG_Message_t of 16 bytes by passing it to a function which accesses it at byte offset 19 using argument 20UL.

to_lab/fsw/src/to_lab_app.c

Lines 168 to 169 in 0c6d816

CFE_MSG_Init(&TO_LAB_Global.HkTlm.TlmHeader.Msg, CFE_SB_ValueToMsgId(TO_LAB_HK_TLM_MID),
sizeof(TO_LAB_Global.HkTlm));

Overrunning struct type CFE_MSG_Message_t of 16 bytes by passing it to a function which accesses it at byte offset 79 using argument 80UL.

to_lab/fsw/src/to_lab_app.c

Lines 399 to 400 in 0c6d816

CFE_MSG_Init(&TO_LAB_Global.DataTypesTlm.TlmHeader.Msg, CFE_SB_ValueToMsgId(TO_LAB_DATA_TYPES_MID),
sizeof(TO_LAB_Global.DataTypesTlm));

Overrunning array PipeName of 16 bytes by passing it to a function which accesses it at byte offset 19.

status = CFE_SB_CreatePipe(&TO_LAB_Global.Cmd_pipe, PipeDepth, PipeName);

Overrunning array ToTlmPipeName of 16 bytes by passing it to a function which accesses it at byte offset 19.

status = CFE_SB_CreatePipe(&TO_LAB_Global.Tlm_pipe, ToTlmPipeDepth, ToTlmPipeName);

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

Reporter Info
Ariel Adams, ASRC Federal

@ArielSAdamsNASA ArielSAdamsNASA added the bug Something isn't working label Oct 6, 2021
@skliper
Copy link
Contributor

skliper commented Oct 7, 2021

All false alarms since they don't actually access past the end of the allocated memory. Should still be cleaned up, switching to enhancement. First two are related to nasa/cFE#1992.

@skliper skliper added enhancement New feature or request and removed bug Something isn't working labels Oct 7, 2021
@skliper skliper changed the title Overruns in to_lab_app.c Overrun warning false alarms in to_lab_app.c Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants