In hwsim_new_edge_nl() and hwsim_set_edge_lqi(), if only one of the two
info->attrs is NULL, the functions will not return.
if (!info->attrs[MAC802154_HWSIM_ATTR_RADIO_ID] &&
!info->attrs[MAC802154_HWSIM_ATTR_RADIO_EDGE])
return -EINVAL;
However, both of them may be dereferenced in the function
nla_parse_nested_deprecated(), causing a null-pointer dereference.
To fix this possible null-pointer dereference, the function returns
-EINVAL if any info_attr is NULL.
Similarly, in hwsim_set_edge_lqi(), if only one of the two edge_attrs is
NULL, both nla_get_u32() and nla_get_u8() will be called, causing a
null-pointer dereference.
Also, to fix this possible null-pointer dereference, the function returns
-EINVAL if any edge_attr is NULL.
Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")
Reported-by: TOTE Robot <oslab@xxxxxxxxxxxxxxx>
Signed-off-by: Tuo Li <islituo@xxxxxxxxx>