소스 검색

qcacld-3.0: Validate length argument's lower boundary

While processing set key vendor command, lower boundary of key
length isn't validated properly, which might lead to buffer overflow.

Validate lower boundary of key length argument properly before
processing set key vendor command.

Change-Id: Ic7a6367db507e652a39a82c6489d64937f1b3429
CRs-Fixed: 2200948
Hanumanth Reddy Pothula 7 년 전
부모
커밋
538748570c
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      core/hdd/src/wlan_hdd_cfg80211.c

+ 2 - 2
core/hdd/src/wlan_hdd_cfg80211.c

@@ -5653,8 +5653,8 @@ static int __wlan_hdd_cfg80211_keymgmt_set_key(struct wiphy *wiphy,
 		return -EPERM;
 	}
 
-	if ((data == NULL) || (data_len == 0) ||
-			(data_len > SIR_ROAM_SCAN_PSK_SIZE)) {
+	if ((data == NULL) || (data_len <= 0) ||
+	    (data_len > SIR_ROAM_SCAN_PSK_SIZE)) {
 		hdd_err("Invalid data");
 		return -EINVAL;
 	}