You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where status is a uint32_t. If libspdm_debug_print passes this to the C printf function then the behavior is undefined.
If any argument is not the correct type for the corresponding conversion specification, the behavior is undefined.
Most compilers can detect this issue. However the libspdm_debug_print function masks this.
There are a few issues and tasks that arise from this.
The conversion specifiers need to be changed. (This issue)
The documentation for libspdm_debug_print needs to specify that format and ... follow C printf conventions.
For CI/CD the LIBSPDM_DEBUG macro needs to be overridden such that it can be replaced with printf. Then the compiler can detect issues like this during compilation.
Even though this invokes undefined behavior I do not consider it much of a vulnerability, since
This issue only arises in a debug build.
For most (all?) compilers the behavior is benign. Most just print the value of the integer.
The text was updated successfully, but these errors were encountered:
There are many instances of
libspdm/library/spdm_requester_lib/libspdm_req_challenge.c
Lines 381 to 382 in 11a60b3
status
is auint32_t
. Iflibspdm_debug_print
passes this to the Cprintf
function then the behavior is undefined.Most compilers can detect this issue. However the
libspdm_debug_print
function masks this.There are a few issues and tasks that arise from this.
libspdm_debug_print
needs to specify thatformat
and...
follow Cprintf
conventions.LIBSPDM_DEBUG
macro needs to be overridden such that it can be replaced withprintf
. Then the compiler can detect issues like this during compilation.Even though this invokes undefined behavior I do not consider it much of a vulnerability, since
The text was updated successfully, but these errors were encountered: