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

RST-IVV-179: ICDH Build 2: cFS Tool Contains Potentially Null Pointers that are De-referenced in Function #103

Open
n-yanchik opened this issue Feb 23, 2022 · 2 comments

Comments

@n-yanchik
Copy link

This issue was observed in IV&V's analysis of the Roman Space Telescope's WFI Instrument ICDH FSW Build 2.0 software release. See attachment for code reference.
cFS TIMs.pdf

RST-IVV-179: ICDH Build 2: cFS Tool Contains Potentially Null Pointers that are De-referenced in Function AllocateSymbols

IVV Severity: 4
Issue Category: Code
Issue Type: Incorrect Code
Count: 2

Description:
There are 2 instances where pointers are checked for Null and then later de-referenced by function AllocateSymbols in file elf2cfetbl.c [Ref. 1], regardless of whether they are valid:

  1. Pointer 'SymbolNames', of type Elf_Sym, is checked for NULL on line 841, and is dereferenced on line 850.
  2. Pointer 'SymbolPtrs', of type Elf_Sym, is checked for NULL on line 834, and is dereferenced on line 849.

If either pointer is Null, a local variable, Status, of type int32, is set to FAILED. However, the Status is not checked prior to de-referencing the pointers. Null pointers should not be de-referenced as doing so will result in application exit or other unpredictable or undesired behavior.

Recommended Actions: Recommend only de-referencing pointers, SymbolPtrs and SymbolNames, when Status is set to SUCCESS.

Impact:
De-referencing a Null pointer, in this case, will create an inconvenience for operators, crew or other projects' personnel since the function, which is part of ground software, will crash and exit.
Options

@skliper skliper transferred this issue from nasa/cFS Feb 23, 2022
@skliper
Copy link
Contributor

skliper commented Feb 23, 2022

@n-yanchik do you need this fixed for Draco?

@n-yanchik
Copy link
Author

n-yanchik commented Feb 23, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants