Skip to contentSkip to conversation

iwlwifi: fix possible potential NULL pointer dereference

PATCH New [email protected] 1 participant 1 message Jan 2, 2020 Intel wireless wifi link (iwlwifi)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iwlwifi: fix possible potential NULL pointer dereference

From: Qing Xu <[email protected]>

iwl_req_fw_callback() check the wrong kmemdup return value, leading to a NULL pointer dereference.
Fix it by replacing the wrong value with the correct.

---
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/iwl-drv.c +1 -1
index 4096ccf58..68c9b7157 100644
@@ -1455,7 +1455,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
 				kmemdup(pieces->dbg_conf_tlv[i],
 					pieces->dbg_conf_tlv_len[i],
 					GFP_KERNEL);
-			if (!pieces->dbg_conf_tlv_len[i])
+			if (!drv->fw.dbg.conf_tlv[i])
 				goto out_free_fw;
 		}
 	}
Signature · 1 line
2.17.1