]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i40iw: Change mem_resources pointer to a u8
authorShiraz Saleem <shiraz.saleem@intel.com>
Mon, 22 Aug 2016 23:09:14 +0000 (18:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Oct 2016 13:21:19 +0000 (15:21 +0200)
commit296fe7f04a1e0db4023e93f1dc949b3595bcbb89
tree8d72e8dcc632ac2738e1273167c8d4a54dcd6d6a
parent1a38d2ab4932698cd4f257f2df86111505846950
i40iw: Change mem_resources pointer to a u8

commit 6c7d46fdb8165ece4b0a17fb8f0b9320dbfeffc2 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: 8e06af711bf2 ("i40iw: add main, hdr, status")
Reported-by: Stefan Assmann <sassmann@redhat.com>
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/i40iw/i40iw.h