From: <gregkh@linuxfoundation.org>
To: mustafa.ismail@intel.com, dledford@redhat.com,
gregkh@linuxfoundation.org, sassmann@redhat.com,
shiraz.saleem@intel.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "i40iw: Avoid writing to freed memory" has been added to the 4.7-stable tree
Date: Wed, 05 Oct 2016 10:18:15 +0200 [thread overview]
Message-ID: <14756554951531@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
i40iw: Avoid writing to freed memory
to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
i40iw-avoid-writing-to-freed-memory.patch
and it can be found in the queue-4.7 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 433c58139f6a7d59824aadd23d6c9cac1d4e6100 Mon Sep 17 00:00:00 2001
From: Mustafa Ismail <mustafa.ismail@intel.com>
Date: Tue, 23 Aug 2016 17:24:56 -0500
Subject: i40iw: Avoid writing to freed memory
From: Mustafa Ismail <mustafa.ismail@intel.com>
commit 433c58139f6a7d59824aadd23d6c9cac1d4e6100 upstream.
iwpbl->iwmr points to the structure that contains iwpbl,
which is iwmr. Setting this to NULL would result in
writing to freed memory. So just free iwmr, and return.
Fixes: d37498417947 ("i40iw: add files for iwarp interface")
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_verbs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
@@ -1924,8 +1924,7 @@ static int i40iw_dereg_mr(struct ib_mr *
}
if (iwpbl->pbl_allocated)
i40iw_free_pble(iwdev->pble_rsrc, palloc);
- kfree(iwpbl->iwmr);
- iwpbl->iwmr = NULL;
+ kfree(iwmr);
return 0;
}
Patches currently in stable-queue which might be from mustafa.ismail@intel.com are
queue-4.7/i40iw-update-hw_iwarp_state.patch
queue-4.7/i40iw-add-missing-check-for-interface-already-open.patch
queue-4.7/i40iw-fix-double-free-of-allocated_buffer.patch
queue-4.7/i40iw-receive-notification-events-correctly.patch
queue-4.7/i40iw-change-mem_resources-pointer-to-a-u8.patch
queue-4.7/i40iw-protect-req_resource_num-update.patch
queue-4.7/i40iw-add-missing-null-check-for-mpa-private-data.patch
queue-4.7/i40iw-avoid-writing-to-freed-memory.patch
queue-4.7/i40iw-do-not-set-self-referencing-pointer-to-null-after-kfree.patch
reply other threads:[~2016-10-05 8:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14756554951531@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=dledford@redhat.com \
--cc=mustafa.ismail@intel.com \
--cc=sassmann@redhat.com \
--cc=shiraz.saleem@intel.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).