| Age | Commit message (Collapse) | Author | Files | Lines |
|
The libspdm submodule was pinned at 3.7.0 (2025-04-03), three releases behind
upstream 3.8.2 (2026-04-03). libspdm processes untrusted responder (device)
data in the SPDM device attestation path, so tracking upstream keeps that
parsing current with fixes and hardening.
Two responder-side advisories were resolved between 3.7.0 and 3.8.2:
- GHSA-j54w-759w-xj3m: out-of-bounds write in GET_CSR handling.
- GHSA-m4wc-xmvg-369f: integer overflow / out-of-bounds read in
GET_MEASUREMENT_EXTENSION_LOG handling.
Both are responder-side. edk2 links SpdmRequesterLib (it acts as the SPDM
Requester that verifies an untrusted device Responder), so these responder
handlers are not built into edk2 images; this update is defense-in-depth
rather than a fix for a path reachable in edk2 today.
The libspdm sources referenced by the SpdmLib INFs are unchanged in 3.8.2
(the only additions are the optional ENDPOINT_INFO capability sources, which
edk2 does not enable), so no INF change is required.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Chris Fernald <chfernal@microsoft.com>
Signed-off-by: Mikey Strauss <mdstrauss91@gmail.com>
|
|
In SpdmSecuredMessageLib, libspdm_secmes_encode_decode.c appears twice
in [Sources] section, so remove the duplicate one.
Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
|
|
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.
`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.
Compared to macro-based include guards, `#pragma once`:
- Eliminates the risk of macro name collisions or copy/paste errors
where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
(e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
file entirely, rather than re-reading it to find the matching
`#endif` ("multiple-include optimization").
- Note that some compilers may already optimize traditional include
guards, by recognzining the idiomatic pattern.
This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.
However, this is considered acceptable given:
1. edk2 already defines a subset of supported compilers in
BaseTools/Conf/tools_def.template, all of which have supported
`#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
include guard naming and potential macro collisions.
Approximate compiler support dates:
- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
(http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
https://github.com/DMTF/libspdm/commit/0f6c6a3e800f487242b973b5858c534186a7db05
fixes incorrectly typed return values in libspdm_hmac_new.
Without this commit XCODE5 refuses to build SecurityPkg, with multiple
errors corresponding to the lines fixed above, each of the form:
libspdm_crypt_hmac.c:31:16: error: expression which evaluates to zero treated as a null pointer constant of type 'void *'
I have updated libspdm to the minimum whole build number which includes
the required commit, though higher releases than 3.7.0, up to 3.8.1, are
available.
Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
|
|
GCC 15 enforces stricter type checking for function pointers. When
passing SPDM transport layer callbacks to
libspdm_register_transport_layer_func, the function pointer types are
incompatible due to differences in boolean parameter types.
The EDK2 uses BOOLEAN (UINT8) while libspdm uses C99 bool (_Bool).
Although these types have the same size and representation,
GCC 15 treats them as incompatible.
Add explicit casts to libspdm_transport_encode_message_func and
libspdm_transport_decode_message_func at the call site to resolve
the type mismatch. This is safe as the types have identical binary
representation and the functions are only called through these
pointers by libspdm.
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
(cherry picked from commit aca8f995405b2bdc48997ce5b0daa975225164e6)
|
|
Some of the spdmlib crypto functions return 'false' in
functions that return a pointer to indicate a null
return. false is mapped to FALSE to cover other usages
to return a boolean value.
Add -Wno-non-literal-null-conversion for CLANGPDB and
CLANGDWARF to ignore these types of errors from CLANG
builds within this one library build that uses the
spdmlib git submodule.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
Fix CLANG 20.1.0 enum conversion errors
Address implied conversion between enum types by using
the enum type from spdmlib and remove the enum types
that are never used after this update.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
In C23 bool is a built-in type, so it's not necessary to typedef
bool in LibspdmStdBoolAlt.h.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
|
|
Implemented SPDM functionality on real hardware, and here is the bug fix in SecurityPkg.
Signed-off-by: Liqi Qi <liqiqi@microsoft.com>
|
|
This patch updates libspdm to pull in various bug fixes,
but primarily commit ca4854be3325bd8fc7f2c714574d17aac2d4e13b
which updates libspdm's MbedTLS submodule to v3.6.2, fixing
CVE https://nvd.nist.gov/vuln/detail/CVE-2023-37920 there.
This CVE does not affect libspdm or edk2, but automatic
CVE scanning tools see the bad version of the certifi
pip module in the edk2/libspdm code trees and flag these
projects as failing.
libspdm has been updated to pull in the newer MbedTLS that
fixes this issue and this patch updates edk2 to pull in
the newer libspdm.
Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
|
|
As noted in https://github.com/DMTF/libspdm/issues/2707, the cmocka
submodule on cryptomilk is unreliable and impacting downstream
consumer builds of SecurityPkg. This is considered a regression in
that pre-existing workflows that clone and recursively initialize
the repo are now broken.
The cmocka host was switched to a more reliable gitlab host in
https://github.com/DMTF/libspdm/pull/2710. This change updates the
submodule in edk2 to use that commit so edk2 users are not blocked
by cryptomilk.org service issues.
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
|
|
libspdm is submodule to support DeviceSecurity feature.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
|
|
This patch implement the SpdmSecurityLib,
which is the core of DeviceSecurity.
And the SpdmSecurityLib include Device Authentication and Measurement.
The other library is to support SpdmSecurityLib.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
|