Procházet zdrojové kódy

qcacld-3.0: fix invalid dp_soc use after free issue

driver module has been stopped since long time no interface is up
and dp_soc handle has been freed, but one virtual interface operation
still try to access invalid dp_soc from gp_cds_context, panic
happened.

set gp_cds_context->dp_soc to NULL if dp_soc is detached.

Change-Id: Icb2aa8bb15e309d8fcc749bafe37253c82a21f36
CRs-Fixed: 2413720
Jinwei Chen před 6 roky
rodič
revize
000e7f2413
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      core/cds/src/cds_api.c

+ 2 - 0
core/cds/src/cds_api.c

@@ -1144,6 +1144,8 @@ QDF_STATUS cds_close(struct wlan_objmgr_psoc *psoc)
 	gp_cds_context->mac_context = NULL;
 
 	cdp_soc_detach(gp_cds_context->dp_soc);
+	gp_cds_context->dp_soc = NULL;
+
 	ucfg_pmo_psoc_update_dp_handle(psoc, NULL);
 	wlan_psoc_set_dp_handle(psoc, NULL);