c4d1c8bc | 17-Dec-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
dsp: firmware_update: Avoid integer overflow
A large fw_device_pkg_data_length could cause uint16_t calc_min_record_length to wrap around. Instead use a size_t.
Change-Id: I1e0ee5a350d82cb477fd0955
dsp: firmware_update: Avoid integer overflow
A large fw_device_pkg_data_length could cause uint16_t calc_min_record_length to wrap around. Instead use a size_t.
Change-Id: I1e0ee5a350d82cb477fd0955a11ded659a5c5933 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
cf9a2df3 | 07-Nov-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
dsp: Add FD side firmware_update encode/decode
This implements FD counterparts for firmware update (type 5) encoding/decoding.
In tests after encoding a message, a subsequent decode is performed an
dsp: Add FD side firmware_update encode/decode
This implements FD counterparts for firmware update (type 5) encoding/decoding.
In tests after encoding a message, a subsequent decode is performed and the outputs are compared. This tests the FD portion of the message decoding.
Change-Id: I5454acee19588b0679a9b0218588fc4c0a66b01d Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
5d4f7b57 | 12-Dec-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
msgbuf: Add pldm_msgbuf_destroy_used()
Used when inserting int a msgbuf, returns the total length that has been used.
Change-Id: I981c6b8a1fd194387fdf8a6a3299c3811d33c622 Signed-off-by: Matt Johnst
msgbuf: Add pldm_msgbuf_destroy_used()
Used when inserting int a msgbuf, returns the total length that has been used.
Change-Id: I981c6b8a1fd194387fdf8a6a3299c3811d33c622 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
e8d8d338 | 28-Oct-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
msgbuf: Add pldm_msgbuf_insert_uint64
Required for encoding firmware update non_functioning_component_bitmap
Change-Id: I3360b09150021bc30423bdc8de4936b6fa31092d Signed-off-by: Matt Johnston <matt@
msgbuf: Add pldm_msgbuf_insert_uint64
Required for encoding firmware update non_functioning_component_bitmap
Change-Id: I3360b09150021bc30423bdc8de4936b6fa31092d Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
5a5129b0 | 03-Dec-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: firmware_update: Add iterator for downstream device parameters
The previous attempt where we invented a struct that made it possible to hold full-sized version strings was awkward on several fr
dsp: firmware_update: Add iterator for downstream device parameters
The previous attempt where we invented a struct that made it possible to hold full-sized version strings was awkward on several fronts. Replace it with an iterator in the style of the downstream device descriptors.
Change-Id: If9b83f4704b3068de9113af7451051c086f39969 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
6a97b79e | 08-Dec-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: firmware_update: Expand "params" in symbol names
Try to keep the names aligned with the spec so that they're more easily searched for. We can abbreviate other words such as request, response, l
dsp: firmware_update: Expand "params" in symbol names
Try to keep the names aligned with the spec so that they're more easily searched for. We can abbreviate other words such as request, response, length etc as necessary.
Change-Id: Ia5a2c93c153c70107be0fcddb1043b2e08cdd026 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
d2f8a7e3 | 26-Nov-2024 |
Unive Tien <unive.tien.wiwynn@gmail.com> |
dsp: firmware_update: pack decomposed parameters to struct
There're two APIs that have decomposed parameters: `encode_query_downstream_identifiers_req()` and `encode_get_downstream_firmware_params_r
dsp: firmware_update: pack decomposed parameters to struct
There're two APIs that have decomposed parameters: `encode_query_downstream_identifiers_req()` and `encode_get_downstream_firmware_params_req(), which against the checklist of API/ABI stabilization, squashed those parameters to a struct to meet the request.
Change-Id: Ia952251cf8dcaeba060985e759e1d7aadf7b5b4d Signed-off-by: Unive Tien <unive.tien.wiwynn@gmail.com>
show more ...
|
71e935cf | 25-Nov-2024 |
Unive Tien <unive.tien.wiwynn@gmail.com> |
dsp: firmware_update: Change return type of downstream device ABI/APIs
So far all of the downstream device related ABI/APIs were marked as `TESTING`, before stabilize them, any deprecated code shoul
dsp: firmware_update: Change return type of downstream device ABI/APIs
So far all of the downstream device related ABI/APIs were marked as `TESTING`, before stabilize them, any deprecated code should be removed, including PLDM Completion Code, therefore, change all of the return type of these to `ERRNO`.
Change-Id: Ie6b390fcc1c91a425f9181ec4ce4495729baab51 Signed-off-by: Unive Tien <unive.tien.wiwynn@gmail.com>
show more ...
|
eb8bb17f | 25-Nov-2024 |
Unive Tien <unive.tien.wiwynn@gmail.com> |
dsp: base: add encode_pldm_header_only_errno()
Currently, `encode_pldm_header_only()` returns PLDM Completion Code, which is deprecated, but most of this API's use case were internally inside libpld
dsp: base: add encode_pldm_header_only_errno()
Currently, `encode_pldm_header_only()` returns PLDM Completion Code, which is deprecated, but most of this API's use case were internally inside libpldm itself, therefore, add `encode_pldm_header_only_errno()` as an internal API.
Change-Id: I87822a4f6afe8aa8eb87034179c37341d7ca4190 Signed-off-by: Unive Tien <unive.tien.wiwynn@gmail.com>
show more ...
|
c69081af | 11-Oct-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
meson: Make transport optional
transport and requester code has Linux-specific dependencies. Make building those parts optional (enabled by default).
Change-Id: I1fff0e3cc0a1edb302eee664d5bccb03254
meson: Make transport optional
transport and requester code has Linux-specific dependencies. Make building those parts optional (enabled by default).
Change-Id: I1fff0e3cc0a1edb302eee664d5bccb0325429609 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
ae05d5e5 | 11-Oct-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
dsp: pdr: Replace ENOKEY with ENOENT
Make pldm_pdr_find_child_container_id_index_range_exclude() return ENOENT, since that is a standard errno. ENOKEY is Linux specific.
pldm_pdr_find_child_contain
dsp: pdr: Replace ENOKEY with ENOENT
Make pldm_pdr_find_child_container_id_index_range_exclude() return ENOENT, since that is a standard errno. ENOKEY is Linux specific.
pldm_pdr_find_child_container_id_index_range_exclude() is marked as TESTING ABI, so the change in error code should be OK.
Change-Id: I3fb3076b236e4e3b1c31f13d819dcaca38076a5d Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
65c64099 | 28-Nov-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
meson: Convert options from feature to boolean
Features are things we can automatically enable or disable based on the presence or absence of supporting dependencies. Neither ABI compliance testing
meson: Convert options from feature to boolean
Features are things we can automatically enable or disable based on the presence or absence of supporting dependencies. Neither ABI compliance testing (despite the fact that we can detect the tool) nor tests fit this category: They are developer tools and their use should be judged ahead of the invocation of meson.
Change-Id: I9725cc0444d92c8443cfb28ecd878f77792f38ce Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
fef24ed6 | 28-Nov-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
meson: Specify OEM extensions in an array
Prevent a proliferation of options by exploiting choice-constrained arrays.
Change-Id: I5bb5c9bfd41d2854fafee189734abcf58b058d82 Signed-off-by: Andrew Jeff
meson: Specify OEM extensions in an array
Prevent a proliferation of options by exploiting choice-constrained arrays.
Change-Id: I5bb5c9bfd41d2854fafee189734abcf58b058d82 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
3a2c6589 | 07-Nov-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: firmware_update: Iterators for downstream device descriptors
Provide an ergonomic and safe means to iterate through downstream devices and their descriptors while avoiding the need to allocate.
dsp: firmware_update: Iterators for downstream device descriptors
Provide an ergonomic and safe means to iterate through downstream devices and their descriptors while avoiding the need to allocate. The strategy leaves the library user to make their own choices about how the data is handled.
The user-facing portion of the change takes the form of two new macros, to be nested inside one another:
``` foreach_pldm_downstream_device(...) { foreach_pldm_downstream_device_descriptor(...) { // Do something with the device-specific descriptor } } ```
Examples uses are provided in the documentation and in changes to the test suite.
Change-Id: I6e79454b94868da73f318635bcaae57cd51fbf97 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
56ef86a0 | 12-Nov-2024 |
Matt Johnston <matt@codeconstruct.com.au> |
dsp: platform: Fix extra parentheses
No functionality change, avoids a warning.
gitlint-ignore: UC1 Fixes: 98e137dede32 ("dsp: platform: Fix decode_set_event_receiver_req()") Change-Id: I38eae0d5e9
dsp: platform: Fix extra parentheses
No functionality change, avoids a warning.
gitlint-ignore: UC1 Fixes: 98e137dede32 ("dsp: platform: Fix decode_set_event_receiver_req()") Change-Id: I38eae0d5e91c79e545b5bcca3a93bd4634435b62 Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
show more ...
|
1be1d5ea | 06-Nov-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: platform: Fix location of closing paren in overflow detection
I suspect this was the result of editor auto-parenthesis support and the result got overlooked.
Add some tests while we're in the
dsp: platform: Fix location of closing paren in overflow detection
I suspect this was the result of editor auto-parenthesis support and the result got overlooked.
Add some tests while we're in the area.
As seems to be the case when we expand the tests associated with argument values, also update the ABI dump to reflect the change in recorded register allocation.
gitlint-ignore: UC1 Fixes: #13 Fixes: ad33b99abcc4 ("dsp: platform: Bounds check encode_state_effecter_pdr()") Reported-by: Daniel M. Crowell <dcrowell@us.ibm.com> Change-Id: Iab4c1c337400678ac424936151a38baf0e0d554d Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
98e137de | 08-Oct-2024 |
Gilbert Chen <gilbertc@nvidia.com> |
dsp: platform: Fix decode_set_event_receiver_req()
Per DSP0248 V1.3.0 table13, the heartbeatTimer field shall be omitted from the request data if eventMessageGlobalEnable is not set to enableAsyncKe
dsp: platform: Fix decode_set_event_receiver_req()
Per DSP0248 V1.3.0 table13, the heartbeatTimer field shall be omitted from the request data if eventMessageGlobalEnable is not set to enableAsyncKeepAlive.
Rework the change in 8c43abb due to the issue found in openbmc/pldm@35f25949fe4d ("Fix invalid read by adjusting request size")
gitlint-ignore: B1, UC1 Fixes: 66c7723adbdc ("msgbuf: Enable pldm_msgbuf_extract() into packed members") Fixes: 9667f5823930 ("platform: pldm_msgbuf for decode_set_event_receiver_req()") Fixes: 6ef2aa90a793 ("platform: Test invalid heartbeat conditions after assignment") Fixes: 9c76679224cf ("libpldm: Migrate to subproject") Change-Id: I7ca50e487b9f1e6c6ea2b34f73c363def8b2d295 Signed-off-by: Gilbert Chen <gilbertc@nvidia.com>
show more ...
|
8f33a1dc | 11-Oct-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: pdr: Rework test in pldm_entity_association_pdr_extract()
Testing on IBM's simulator[1] and bisection by Manoj found that 9e566597d91e ("dsp: pdr: Bound check pldm_entity_association_pdr_extrac
dsp: pdr: Rework test in pldm_entity_association_pdr_extract()
Testing on IBM's simulator[1] and bisection by Manoj found that 9e566597d91e ("dsp: pdr: Bound check pldm_entity_association_pdr_extract()") caused their host boot process to come unstuck[1]:
[1]: https://gerrit.openbmc.org/c/openbmc/openbmc/+/75130/comments/fc6548ce_78285814
``` 26.98655|2024/10/08 10:04:51|ISTEP 6. 5 - host_set_ipl_parms 27.02035|2024/10/08 10:04:51|ISTEP 6. 6 - host_discover_targets 27.31030|Detected new part : 00030000 (Physical:/Sys0/Node0/DIMM0) 27.64652|Detected new part : 00030004 (Physical:/Sys0/Node0/DIMM2) 29.58074|Detected new part : 00050000 (Physical:/Sys0/Node0/Proc0) 43.28986|Detected new part : 00050000 (Physical:/Sys0/Node0/Proc0) 47.49649|HWAS|--------------------------------- 47.49650|HWAS|PRESENT> 47.52988|TARG|PROC=80000000 47.53612|TARG|PROC[00]: 47.53616|TARG| CORE=FF000000 DIMM=8800000000000000 47.53620|TARG| CACHE=FF000000 OCMB=C000 47.53632|TARG|PROC[01]: 47.53637|TARG| CORE=00000000 DIMM=0000000000000000 47.53641|TARG| CACHE=00000000 OCMB=0000 47.3653|TARG|PROC[02]: 47.53658|TARG| CORE=00000000 DIMM=0000000000000000 47.53662|TARG| CACHE=00000000 OCMB=0000 47.53674|TARG|PROC[03]: 47.53679|TARG| CORE=00000000 DIMM=0000000000000000 47.53683|TARG| CACHE=00000000 OCMB=0000 47.53738|WAS|--------------------------------- 47.56477|devtree|Syncing to BMC 57.36060|Triggering graceful reboot fr Rebooting due to a FRU hot-remove 57.85530|================================================ 57.87003|Error reprted by pldm (0x4700) EID 0x90000013 57.88170| Software problem, could not find reboot count effecter PDR. 57.88174| ModuleId 0x3e MOD_RESET_REBOOT_COUNT 57.90019| ReasonCode 0x471a RC_INVALID_EFFECTER_ID 57.90028| UserData1 The total number of PDRs that PDR Manager is aware of. : 0x00000000000001ee 57.90031| UserData2 : 0x0000000000000000 57.90034|------------------------------------------------ 57.90038| Callouttype : Procedure Callout 57.90041| Procedure : EPUB_PRC_HB_CODE 57.92782| Priority : SRCI_PRIORITY_HIGH 57.92785|----------------------------------------------- 57.92788| Callout type : Procedure Callout 57.92791| Procedure : EPUB_PRC_SP_COE 57.92794| Priority : SRCI_PRIORITY_HIGH 57.92798|----------------------------------------------- 57.92801| Callout type : Procedure Callout 57.92804| Procedure : EPUB_PRC_HB_CODE 57.92808| Priority : SRCI_PRIORITY_MED 57.92811|------------------------------------------------ 57.92816| Hostboot Build ID: hostboot-p11-e7437ab-sha1:997c6a7f/hbicore.bin 57.92819|================================================ 59.00252|Soft poweroff requested by the BMC ```
This seems to be the result of the following from the BMC's side:
``` Oct 08 10:04:30 p10bmc pldmd[642]: Instance ID expiry for EID '9' using InstanceID '1' Oct 08 10:04:30 p10bmc pldmd[642]: Failed to receive response for setEventReceiver command Oct 08 10:04:32 p10bmc pldmd[642]: sdeventplus: ioCallback: Instance ID 1 for TID 9 was not previously allocated Oct 08 10:04:32 p10bmc pldmd[642]: sdeventplus: ioCallback: Instance ID 1 for TID 9 was not previously allocated Oct 08 10:04:32 p10bmc pldmd[642]: sdeventplus: ioCallback: Instance ID 1 for TID 9 was not previously allocated Oct 08 10:04:32 p10bmc bmcwebd[282]: PAM unable to resolve symbol: pam_sm_acct_mgmt Oct 08 10:04:33 p10bmc bmcwebd[282]: pam_succeed_if(webserver:auth): requirement "user ingroup redfish" was met by user "root" Oct 08 10:04:35 p10bmc bmcwebd[282]: PAM unable to resolve symbol: pam_sm_acct_mgmt Oct 08 10:04:35 p10bmc pldmd[642]: Checking if directory '/usr/share/pldm/pdr' exists Oct 08 10:04:35 p10bmc pldmd[642]: Checking if directory '/usr/share/pldm/pdr/com.ibm.Hardware.Chassis.Model.Rainier4U' exists Oct 08 10:04:35 p10bmc pldmd[642]: Failed to create sensor PDR, D-Bus object '/org/freedesktop/UPower/devices/ups_hiddev0' returned error - sd_bus_call: xyz.openbmc_project.Common.Error.ResourceNotFound: The resource is not found. Oct 08 10:04:35 p10bmc bmcwebd[282]: pam_succeed_if(webserver:auth): requirement "user ingroup redfish" was met by user "root" Oct 08 10:04:36 p10bmc pldmd[642]: Failed to create sensor PDR, D-Bus object '/xyz/openbmc_project/led/physical/virtual_enc_id' returned error - sd_bus_call: xyz.openbmc_project.Common.Error.ResourceNotFound: The resource is not found. Oct 08 10:04:36 p10bmc pldmd[642]: Failed to create sensor PDR, D-Bus object '/xyz/openbmc_project/led/physical/virtual_enc_fault' returned error - sd_bus_call: xyz.openbmc_project.Common.Error.ResourceNotFound: The resource is not found. ```
Ultimately the check was trying to satisfy the following from GCC's analyzer:
``` | 1345 | size_t l_num_entities = entity_association_pdr->num_children + 1; | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) ...to here | 1346 | if (l_num_entities < 2) { | | ~ | | | | | (17) following ‘false’ branch (when ‘l_num_entities > 1’)... |...... | 1354 | pldm_entity *l_entities = calloc(l_num_entities, sizeof(pldm_entity)); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (18) ...to here | | (19) use of attacker-controlled value ‘(size_t)((int)*((char *)&*pdr + 10).num_children + 1) * 6’ as size without upper-bounds checking | ```
However, rather than the relationship to pdr_len, the issue was the confusion from the promotion from uint8_t to size_t. Teach the analyzer about the UINT8_MAX limit explicitly.
gitlint-ignore: UC1, B1 Fixes: 9e566597d91e ("dsp: pdr: Bound check pldm_entity_association_pdr_extract()") Change-Id: I0c71ba3b80da2946658a4e6a3add4636752b4e74 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
36324f6b | 24-Sep-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
Apply GCC's tainted_args attribute to library entrypoints
The implementation applies `__attribute__((tainted_args))` by integrating it into the existing ABI macro annotations.
In the process, quite
Apply GCC's tainted_args attribute to library entrypoints
The implementation applies `__attribute__((tainted_args))` by integrating it into the existing ABI macro annotations.
In the process, quite a number of APIs were discovered to be unsafe in ways that were not immediately fixable. Often this is because they lack arguments that enable the appropriate bounds-checking to be applied.
Redesigning them is work beyond the scope of the immediate effort. Instead, we also introduce a new annotation, LIBPLDM_ABI_DEPRECATED_UNSAFE, that simply lacks `__attribute__((tainted_args))` and therefore doesn't trigger the extra analysis.
Change-Id: Ib8994eaa3907a5432d040426ad03687cbf4c2136 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
a180963a | 04-Oct-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
utils: Avoid array-lookup in is_time_legal()
``` ../src/utils.c: In function ‘is_time_legal’: ../src/utils.c:213:22: error: use of attacker-controlled value ‘month’ in array lookup without checking
utils: Avoid array-lookup in is_time_legal()
``` ../src/utils.c: In function ‘is_time_legal’: ../src/utils.c:213:22: error: use of attacker-controlled value ‘month’ in array lookup without checking for negative [CWE-129] [-Werror=analyzer-tainted-array-index] 213 | unsigned int rday = days[month]; | ^~~~ ```
This isn't really the case, but GCC's analyzer currently thinks so, so clean it up with a switch statement.
Change-Id: I60e0a6cb3ad275455fdc27de8042afe34c09ba60 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
21cb052b | 04-Oct-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios_table: Bounds check pldm_bios_table_string_entry_encode()
``` ../src/dsp/bios_table.c:82:9: error: use of attacker-controlled value ‘str_length’ as size without upper-bounds checking [CWE-
dsp: bios_table: Bounds check pldm_bios_table_string_entry_encode()
``` ../src/dsp/bios_table.c:82:9: error: use of attacker-controlled value ‘str_length’ as size without upper-bounds checking [CWE-129] [-Werror=analyzer-tainted-size] 82 | memcpy(string_entry->name, str, str_length); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
Fixes: 9c76679224cf ("libpldm: Migrate to subproject") Change-Id: I1aaa18b358c3e6c958b2d9643487016f2a9f5116 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
3b33c135 | 03-Oct-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios: Bounds check encode_set_bios_attribute_current_value_req()
``` ../src/dsp/bios.c: In function ‘encode_set_bios_attribute_current_value_req’: ../src/dsp/bios.c:496:9: error: use of attacke
dsp: bios: Bounds check encode_set_bios_attribute_current_value_req()
``` ../src/dsp/bios.c: In function ‘encode_set_bios_attribute_current_value_req’: ../src/dsp/bios.c:496:9: error: use of attacker-controlled value ‘attribute_length’ as size without upper-bounds checking [CWE-129] [-Werror=analyzer-tainted-size] 496 | memcpy(request->attribute_data, attribute_data, attribute_length); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
gitlint-ignore: T1, B1 Fixes: 9c76679224cf ("libpldm: Migrate to subproject") Change-Id: I65fb55204298e5ba16c037fe289a7d94a04e8599 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
37016fef | 03-Oct-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: bios: Bounds check encode_set_bios_table_req()
``` ../src/dsp/bios.c:614:9: error: use of attacker-controlled value ‘table_length’ as size without upper-bounds checking [CWE-129] [-Werror=analy
dsp: bios: Bounds check encode_set_bios_table_req()
``` ../src/dsp/bios.c:614:9: error: use of attacker-controlled value ‘table_length’ as size without upper-bounds checking [CWE-129] [-Werror=analyzer-tainted-size] 614 | memcpy(request->table_data, table_data, table_length); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
Fixes: 9c76679224cf ("libpldm: Migrate to subproject") Change-Id: I2a9679f9ab9f743a2521ff2d20e42b8d07c706df Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
d7d08f65 | 03-Oct-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: fru: Bounds check encode_fru_record()
``` ../src/dsp/fru.c:200:17: error: use of attacker-controlled value ‘tlvs_size’ as size without upper-bounds checking [CWE-129] [-Werror=analyzer-tainted-
dsp: fru: Bounds check encode_fru_record()
``` ../src/dsp/fru.c:200:17: error: use of attacker-controlled value ‘tlvs_size’ as size without upper-bounds checking [CWE-129] [-Werror=analyzer-tainted-size] 200 | memcpy(fru_table + *curr_size, tlvs, tlvs_size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
Fixes: 9c76679224cf ("libpldm: Migrate to subproject") Change-Id: Ibc2831c5fd9665bb2645d49c856fc1a77c6e1feb Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
82c34815 | 03-Oct-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
dsp: fru: Bounds check encode_get_fru_record_by_option_resp()
``` ../src/dsp/fru.c: In function ‘encode_get_fru_record_by_option_resp’: ../src/dsp/fru.c:388:17: error: use of attacker-controlled val
dsp: fru: Bounds check encode_get_fru_record_by_option_resp()
``` ../src/dsp/fru.c: In function ‘encode_get_fru_record_by_option_resp’: ../src/dsp/fru.c:388:17: error: use of attacker-controlled value ‘data_size’ as size without upper-bounds checking [CWE-129] [-Werror=analyzer-tainted-size] 388 | memcpy(resp->fru_structure_data, fru_structure_data, data_size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
Fixes: 9c76679224cf ("libpldm: Migrate to subproject") Change-Id: I01b43823e3a24c7e7ed229d09643b15fcff4d43b Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|