nasa / cFE

The Core Flight System (cFS) Core Flight Executive (cFE)
Apache License 2.0
402 stars 198 forks source link

Static analysis issues JSC 2.1 #2552

Closed chillfig closed 1 week ago

chillfig commented 2 months ago

Describe the bug Handful of static analysis issues. This report records the findings from the static analysis to facilitate their tracking.

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

Source Folder Source Filename Source Line Source Object Destination Folder Destination Filename Destination Line Destination Object Disposition
Unchecked Return Value of a Function                
\cfe\modules\evs\fsw\src cfe_evs_utils.c 548 snprintf         Will Fix. cFE PR #2566
Use of sizeof in pointer                
\cfe\modules\evs\fsw\src cfe_evs.c 119 Spec \cfe\modules\evs\fsw\src cfe_evs.c 149 sizeof Will Not Fix. sizeof is not applied to Spec directly; instead, Spec is used as a format string in vsnprintf within EVS_GenerateEventTelemetry, which handles the string length appropriately based on the format specified and the variable arguments received.
\cfe\modules\evs\fsw\src cfe_evs.c 169 Spec \cfe\modules\evs\fsw\src cfe_evs.c 199 sizeof Will Not Fix. sizeof is not applied to Spec directly; instead, Spec is used as a format string in vsnprintf within EVS_GenerateEventTelemetry, which handles the string length appropriately based on the format specified and the variable arguments received.
\cfe\modules\evs\fsw\src cfe_evs.c 218 Spec \cfe\modules\evs\fsw\src cfe_evs.c 244 sizeof Will Not Fix. sizeof is not applied to Spec directly; instead, Spec is used as a format string in vsnprintf within EVS_GenerateEventTelemetry, which handles the string length appropriately based on the format specified and the variable arguments received.
Buffer Improper Index Access                
\osal\src\os\portable os-impl-posix-io.c 195 buffer \tools\ctf\external\sample_cfs_workspace\cfe\modules\tbl\fsw\src cfe_tbl_internal.c 1255 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \cfe\modules\fs\fsw\src cfe_fs_api.c 359 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \cfe\modules\tbl\fsw\src cfe_tbl_internal.c 1213 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \tools\ctf\external\sample_cfs_workspace\cfe\modules\fs\fsw\src cfe_fs_api.c 369 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \tools\ctf\external\sample_cfs_workspace\cfe\modules\tbl\fsw\src cfe_tbl_internal.c 1256 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \cfe\modules\fs\fsw\src cfe_fs_api.c 360 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \cfe\modules\tbl\fsw\src cfe_tbl_internal.c 1214 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \tools\ctf\external\sample_cfs_workspace\cfe\modules\fs\fsw\src cfe_fs_api.c 370 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \tools\ctf\external\sample_cfs_workspace\cfe\modules\tbl\fsw\src cfe_tbl_internal.c 1257 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \tools\ctf\external\sample_cfs_workspace\cfe\modules\fs\fsw\src cfe_fs_api.c 371 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \cfe\modules\fs\fsw\src cfe_fs_api.c 357 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \cfe\modules\tbl\fsw\src cfe_tbl_internal.c 1211 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \tools\ctf\external\sample_cfs_workspace\cfe\modules\fs\fsw\src cfe_fs_api.c 372 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \tools\ctf\external\sample_cfs_workspace\cfe\modules\tbl\fsw\src cfe_tbl_internal.c 1254 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \cfe\modules\fs\fsw\src cfe_fs_api.c 358 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.
\osal\src\os\portable os-impl-posix-io.c 195 buffer \cfe\modules\tbl\fsw\src cfe_tbl_internal.c 1212 OutPtr Will Not Fix. Safe access to InPtr[0-3] and OutPtr[0-3] as both manipulate bytes within 4-byte integers.

To Reproduce N/A. These issues were communicated by JSC.

Expected behavior Need to resolve these. Should resolve and/or disposition the higher ranked ones at minimum.

Code snips N/A

System observed on: N/A

Additional context N/A

Reporter Info Imported from JSC 2.1 static analysis