Patch "RDMA/iw_cxgb4: Avoid touch after free error in ARP failure handlers" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
RDMA/iw_cxgb4: Avoid touch after free error in ARP failure handlers
to the 4.9-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:
rdma-iw_cxgb4-avoid-touch-after-free-error-in-arp-failure-handlers.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Apr 9 17:09:24 CEST 2018
From: Raju Rangoju <[email protected]>
Date: Mon, 15 May 2017 06:40:39 +0000
Subject: RDMA/iw_cxgb4: Avoid touch after free error in ARP failure handlers
From: Raju Rangoju <[email protected]>
[ Upstream commit 1dad0ebeea1cd890b8892523f736916e245b0aef ]
The patch 761e19a504af (RDMA/iw_cxgb4: Handle return value of c4iw_ofld_send() in abort_arp_failure()) from May 6, 2016 leads to the following static checker warning:
drivers/infiniband/hw/cxgb4/cm.c:575 abort_arp_failure()
warn: passing freed memory 'skb'
Also fixes skb leak when l2t resolution fails
c4iw_ofld_send() in abort_arp_failure())
--- drivers/infiniband/hw/cxgb4/cm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/infiniband/hw/cxgb4/cm.c +5 -1
@@ -488,6 +488,7 @@ static int _put_ep_safe(struct c4iw_dev ep = *((struct c4iw_ep **)(skb->cb +2 *sizeof (void *)));release_ep_resources (ep); +kfree_skb (skb);return 0 ; }
@@ -498,6 +499,7 @@ static int _put_pass_ep_safe(struct c4iw ep = *((struct c4iw_ep **)(skb->cb +2 *sizeof (void *)));c4iw_put_ep (&ep->parent_ep->com);release_ep_resources (ep); +kfree_skb (skb);return 0 ; }
@@ -569,11 +571,13 @@ static void abort_arp_failure(void *handPDBG ("%s rdev %p\n" , __func__, rdev); req->cmd =CPL_ABORT_NO_RST ; +skb_get (skb); ret =c4iw_ofld_send (rdev, skb);if (ret) {__state_set (&ep->com,DEAD );queue_arp_failure_cpl (ep, skb,FAKE_CPL_PUT_EP_SAFE ); - } + }else +kfree_skb (skb); }static int send_flowc (struct c4iw_ep *ep)
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/rdma-iw_cxgb4-avoid-touch-after-free-error-in-arp-failure-handlers.patch