Skip to content

Debug printing of secrets #3415

@steven-bellock

Description

@steven-bellock

https://github.com/DMTF/libspdm/blob/main/library/spdm_secured_message_lib/libspdm_secmes_session.c contains prints such as

LIBSPDM_DEBUG((LIBSPDM_DEBUG_INFO, "key (0x%zx) - ", key_length));
LIBSPDM_INTERNAL_DUMP_DATA(key, key_length);
LIBSPDM_DEBUG((LIBSPDM_DEBUG_INFO, "\n"));
Some folks that enable LIBSPDM_DEBUG_PRINT_ENABLE in production for diagnostic prints might be surprised to learn that session secrets could make their way to a log file. Two solutions to resolve this are

  1. Remove the prints entirely.
  2. Introduce a new macro such as LIBSPDM_DEBUG_PRINT_SECRET_ENABLE that is disabled by default.

Metadata

Metadata

Labels

securityAn issue that impacts security

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions