From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:57916 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933372AbcFQSSp (ORCPT ); Fri, 17 Jun 2016 14:18:45 -0400 Subject: Patch "tipc: check nl sock before parsing nested attributes" has been added to the 4.4-stable tree To: richard.alpe@ericsson.com, davem@davemloft.net, gregkh@linuxfoundation.org, jon.maloy@ericsson.cm, sploving1@gmail.com Cc: , From: Date: Fri, 17 Jun 2016 11:18:44 -0700 Message-ID: <1466187524138224@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled tipc: check nl sock before parsing nested attributes to the 4.4-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: tipc-check-nl-sock-before-parsing-nested-attributes.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Fri Jun 17 11:18:18 PDT 2016 From: Richard Alpe Date: Mon, 16 May 2016 11:14:54 +0200 Subject: tipc: check nl sock before parsing nested attributes From: Richard Alpe [ Upstream commit 45e093ae2830cd1264677d47ff9a95a71f5d9f9c ] Make sure the socket for which the user is listing publication exists before parsing the socket netlink attributes. Prior to this patch a call without any socket caused a NULL pointer dereference in tipc_nl_publ_dump(). Tested-and-reported-by: Baozeng Ding Signed-off-by: Richard Alpe Acked-by: Jon Maloy Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/tipc/socket.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2814,6 +2814,9 @@ int tipc_nl_publ_dump(struct sk_buff *sk if (err) return err; + if (!attrs[TIPC_NLA_SOCK]) + return -EINVAL; + err = nla_parse_nested(sock, TIPC_NLA_SOCK_MAX, attrs[TIPC_NLA_SOCK], tipc_nl_sock_policy); Patches currently in stable-queue which might be from richard.alpe@ericsson.com are queue-4.4/tipc-check-nl-sock-before-parsing-nested-attributes.patch queue-4.4/tipc-fix-nametable-publication-field-in-nl-compat.patch