static analysis reports "Buffer not null terminated" issues in stx-fault/fm_common
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
High
|
Ran An |
Bug Description
Brief Description
-----------------
in some files it use 'sncpy()' function which can not guarantee null termination of the string. This will lead a further security issue: "If the buffer is treated as a null terminated string in later operations, a buffer overflow or over-read may occur."
Severity
--------
Major
Steps to Reproduce
------------------
use function 'snprintf()' instead of 'sncpy()'
Expected Behavior
------------------
static analysis do not report this issue
Actual Behavior
----------------
static analysis report this issue
Reproducibility
---------------
Reproducible
System Configuration
-------
all
Static Analysis Reports
-------
Buffer not null terminated
If the buffer is treated as a null terminated string in later operations, a buffer overflow or over-read may occur.
fmAlarmUtils.
buffer_
similar cases at
fmAlarmUtils.
fmAlarmUtils.
fmAlarmUtils.
fmAlarmUtils.
fmAlarmUtils.
fmAlarmUtils.
fmAlarmUtils.
fmDbAlarm.
fmDbAlarm.
fmDbAlarm.
fmDbEventLog.
Changed in starlingx: | |
assignee: | nobody → Ran An (an.ran) |
tags: | added: stx.security |
Changed in starlingx: | |
importance: | Undecided → High |
status: | New → Triaged |
description: | updated |
description: | updated |
Changed in starlingx: | |
status: | Triaged → Fix Released |
tags: | added: stx.2019.03 |
information type: | Private Security → Public Security |
tags: |
added: stx.2019.05 removed: stx.2019.03 |
tags: |
added: stx.2.0 removed: stx.2019.05 |
Please update this bug with specific file and line number information for the static analysis issue. Make sure the bug has enough information for someone to find the problem in the code without access to the tool or the report.