* [PATCH net-next] tipc: fix null deref crash in compat config path
@ 2016-02-24 16:20 Florian Westphal
2016-02-25 22:06 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2016-02-24 16:20 UTC (permalink / raw)
To: netdev; +Cc: Florian Westphal
msg.dst_sk needs to be set up with a valid socket because some callbacks
later derive the netns from it.
Fixes: 263ea09084d172d ("Revert "genl: Add genlmsg_new_unicast() for unicast message allocation")
Reported-by: Jon Maloy <maloy@donjonn.com>
Bisected-by: Jon Maloy <maloy@donjonn.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by Jon Maloy <jon.maloy@ericsson.com>
---
net/tipc/netlink_compat.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
index de66d8f..d7d050f 100644
--- a/net/tipc/netlink_compat.c
+++ b/net/tipc/netlink_compat.c
@@ -1105,6 +1105,7 @@ static int tipc_nl_compat_recv(struct sk_buff *skb, struct genl_info *info)
msg.req = nlmsg_data(req_nlh) + GENL_HDRLEN + TIPC_GENL_HDRLEN;
msg.cmd = req_userhdr->cmd;
msg.net = genl_info_net(info);
+ msg.dst_sk = skb->sk;
if ((msg.cmd & 0xC000) && (!netlink_net_capable(skb, CAP_NET_ADMIN))) {
msg.rep = tipc_get_err_tlv(TIPC_CFG_NOT_NET_ADMIN);
--
2.4.10
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] tipc: fix null deref crash in compat config path
2016-02-24 16:20 [PATCH net-next] tipc: fix null deref crash in compat config path Florian Westphal
@ 2016-02-25 22:06 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-02-25 22:06 UTC (permalink / raw)
To: fw; +Cc: netdev
From: Florian Westphal <fw@strlen.de>
Date: Wed, 24 Feb 2016 17:20:17 +0100
> msg.dst_sk needs to be set up with a valid socket because some callbacks
> later derive the netns from it.
>
> Fixes: 263ea09084d172d ("Revert "genl: Add genlmsg_new_unicast() for unicast message allocation")
> Reported-by: Jon Maloy <maloy@donjonn.com>
> Bisected-by: Jon Maloy <maloy@donjonn.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>
> Acked-by Jon Maloy <jon.maloy@ericsson.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-25 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24 16:20 [PATCH net-next] tipc: fix null deref crash in compat config path Florian Westphal
2016-02-25 22:06 ` 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).