OSDN Git Service

iwlwifi: mei: don't rely on the size from the shared area
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 28 Nov 2021 12:15:09 +0000 (14:15 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 7 Dec 2021 10:58:04 +0000 (12:58 +0200)
commit652291601459272d52b6ba12811f0b60b3e6444f
tree957061d560436b55483369d0722527e24766a943
parentfe6db7eda9306d665f7b8fc3decdb556ec10fb85
iwlwifi: mei: don't rely on the size from the shared area

If CSME is compromised, it could report a bigger queue size
in the share area and make the host perform an out of bound
access.
Instead of reading the size of the queue from the shared area,
store it in the regular context which is not accessible by CSME.

While at it, fix a small typo in an error print.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Link: https://lore.kernel.org/r/20211128121509.3952-1-emmanuel.grumbach@intel.com
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mei/main.c