浏览代码

Merge tag 'mac80211-for-john-2014-11-10' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211

Johannes Berg <johannes@sipsolutions.net> says:

"This has just one fix, for an issue with the CCMP decryption
that can cause a kernel crash. I'm not sure it's remotely
exploitable, but it's an important fix nonetheless."

Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville 10 年之前
父节点
当前提交
6168823518
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      net/mac80211/aes_ccm.c

+ 3 - 0
net/mac80211/aes_ccm.c

@@ -53,6 +53,9 @@ int ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
 		__aligned(__alignof__(struct aead_request));
 		__aligned(__alignof__(struct aead_request));
 	struct aead_request *aead_req = (void *) aead_req_data;
 	struct aead_request *aead_req = (void *) aead_req_data;
 
 
+	if (data_len == 0)
+		return -EINVAL;
+
 	memset(aead_req, 0, sizeof(aead_req_data));
 	memset(aead_req, 0, sizeof(aead_req_data));
 
 
 	sg_init_one(&pt, data, data_len);
 	sg_init_one(&pt, data, data_len);