Skip to content

Commit a8458c7

Browse files
committed
fix(zwave_rx): Harden zwave_rx_zwapi_callbacks.c
Add extra check to prevent small buffers attacks. Bug-SiliconLabs: UIC-3672 Relate-to: SLVDBBP-3169959 Signed-off-by: Philippe Coval <[email protected]>
1 parent aa6fabf commit a8458c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

applications/zpc/components/zwave/zwave_rx/src/zwave_rx_zwapi_callbacks.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ static void
207207
zwave_node_info_t *destination_node_info)
208208
{
209209
if (zwapi_zwave_nif == NULL || destination_node_info == NULL
210-
|| zwapi_zwave_nif_length == 0) {
210+
|| zwapi_zwave_nif_length == 0
211+
|| zwapi_zwave_nif_length <= 3 // For zwave_command_class_list_unpack
212+
) {
211213
return;
212214
}
213215

0 commit comments

Comments
 (0)