* [PATCH net v1 1/1] tipc: fix nullptr crash during subscription cancel
@ 2016-03-03 16:54 Parthasarathy Bhuvaragan
2016-03-07 4:01 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Parthasarathy Bhuvaragan @ 2016-03-03 16:54 UTC (permalink / raw)
To: davem; +Cc: jon.maloy, netdev, tipc-discussion
commit 4d5cfcba2f6e ('tipc: fix connection abort during subscription
cancel'), removes the check for a valid subscription before calling
tipc_nametbl_subscribe().
This will lead to a nullptr exception when we process a
subscription cancel request. For a cancel request, a null
subscription is passed to tipc_nametbl_subscribe() resulting
in exception.
In this commit, we call tipc_nametbl_subscribe() only for
a valid subscription.
Fixes: 4d5cfcba2f6e ('tipc: fix connection abort during subscription cancel')
Reported-by: Anders Widell <anders.widell@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
---
net/tipc/subscr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
index 69ee2eeef968..f9ff73a8d815 100644
--- a/net/tipc/subscr.c
+++ b/net/tipc/subscr.c
@@ -296,7 +296,8 @@ static void tipc_subscrb_rcv_cb(struct net *net, int conid,
if (tipc_subscrp_create(net, (struct tipc_subscr *)buf, subscrb, &sub))
return tipc_conn_terminate(tn->topsrv, subscrb->conid);
- tipc_nametbl_subscribe(sub);
+ if (sub)
+ tipc_nametbl_subscribe(sub);
}
/* Handle one request to establish a new subscriber */
--
2.1.4
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net v1 1/1] tipc: fix nullptr crash during subscription cancel
2016-03-03 16:54 [PATCH net v1 1/1] tipc: fix nullptr crash during subscription cancel Parthasarathy Bhuvaragan
@ 2016-03-07 4:01 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-03-07 4:01 UTC (permalink / raw)
To: parthasarathy.bhuvaragan
Cc: netdev, tipc-discussion, jon.maloy, maloy, ying.xue
From: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Date: Thu, 3 Mar 2016 17:54:54 +0100
> commit 4d5cfcba2f6e ('tipc: fix connection abort during subscription
> cancel'), removes the check for a valid subscription before calling
> tipc_nametbl_subscribe().
>
> This will lead to a nullptr exception when we process a
> subscription cancel request. For a cancel request, a null
> subscription is passed to tipc_nametbl_subscribe() resulting
> in exception.
>
> In this commit, we call tipc_nametbl_subscribe() only for
> a valid subscription.
>
> Fixes: 4d5cfcba2f6e ('tipc: fix connection abort during subscription cancel')
> Reported-by: Anders Widell <anders.widell@ericsson.com>
> Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
> Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-07 4:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 16:54 [PATCH net v1 1/1] tipc: fix nullptr crash during subscription cancel Parthasarathy Bhuvaragan
2016-03-07 4:01 ` David Miller
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).