Commit 296fe7f0 authored by Shiraz Saleem's avatar Shiraz Saleem Committed by Greg Kroah-Hartman

i40iw: Change mem_resources pointer to a u8

commit 6c7d46fd upstream.

iwdev->mem_resources is incorrectly defined as an unsigned
long instead of u8. As a result, the offset into the dynamic
allocated structures in i40iw_initialize_hw_resources() is
incorrectly calculated and would lead to writing of memory
regions outside of the allocated buffer.

Fixes: 8e06af71 ("i40iw: add main, hdr, status")
Reported-by: default avatarStefan Assmann <sassmann@redhat.com>
Signed-off-by: default avatarMustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1a38d2ab
...@@ -232,7 +232,7 @@ struct i40iw_device { ...@@ -232,7 +232,7 @@ struct i40iw_device {
struct i40e_client *client; struct i40e_client *client;
struct i40iw_hw hw; struct i40iw_hw hw;
struct i40iw_cm_core cm_core; struct i40iw_cm_core cm_core;
unsigned long *mem_resources; u8 *mem_resources;
unsigned long *allocated_qps; unsigned long *allocated_qps;
unsigned long *allocated_cqs; unsigned long *allocated_cqs;
unsigned long *allocated_mrs; unsigned long *allocated_mrs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment