wifi: iwlwifi: mvm: don't trust firmware n_channels
If the firmware sends us a corrupted MCC response with n_channels much larger than the command response can be, we might copy far too much (uninitialized) memory and even crash if the n_channels is large enough to make it run out of the one page allocated for the FW response. Fix that by checking the lengths. Doing a < comparison would be sufficient, but the firmware should be doing it correctly, so check more strictly. Fixes: dcaf9f5e ("iwlwifi: mvm: add MCC update FW API") Signed-off-by: NJohannes Berg <johannes.berg@intel.com> Signed-off-by: NGregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230514120631.d7b233139eb4.I51fd319df8e9d41881fc8450e83d78049518a79a@changeidSigned-off-by: NJohannes Berg <johannes.berg@intel.com>
Showing
想要评论请 注册 或 登录