Explorar o código

qcacld-3.0: Add bounday check for multicastAddr array

qcacld-2.0 to qcacld-3.0 propagation.

In hdd_set_rx_filter API multicastAddr array being accessed beyond
its size.

Add boundary check for multicastAddr.

CRs-Fixed: 1104565
Change-Id: I8e1543a8f42ac40c04d2c6a17e69718d13cbd706
SaidiReddy Yenuga %!s(int64=8) %!d(string=hai) anos
pai
achega
0b2c9f4d02
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      core/hdd/src/wlan_hdd_ioctl.c

+ 2 - 0
core/hdd/src/wlan_hdd_ioctl.c

@@ -6080,6 +6080,8 @@ static int hdd_set_rx_filter(hdd_adapter_t *adapter, bool action,
 				    MAC_ADDR_ARRAY(filter->multicastAddr[j].bytes));
 				j++;
 			}
+			if (j == SIR_MAX_NUM_MULTICAST_ADDRESS)
+				break;
 		}
 		filter->ulMulticastAddrCnt = j;
 		/* Set rx filter */