ACK: [CVE-2016-4951][vivid, wily, xenial, yakkety] tipc: check nl sock before parsing nested attributes
Christopher Arges
chris.j.arges at canonical.com
Thu May 26 12:49:34 UTC 2016
On Wed, May 25, 2016 at 04:23:10PM +0100, Luis Henriques wrote:
> From: Richard Alpe <richard.alpe at ericsson.com>
>
> 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 <sploving1 at gmail.com>
> Signed-off-by: Richard Alpe <richard.alpe at ericsson.com>
> Acked-by: Jon Maloy <jon.maloy at ericsson.cm>
> Signed-off-by: David S. Miller <davem at davemloft.net>
> (cherry picked from commit 45e093ae2830cd1264677d47ff9a95a71f5d9f9c)
> CVE-2016-4951
> BugLink: https://bugs.launchpad.net/bugs/1585365
> Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
> ---
> net/tipc/socket.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/tipc/socket.c b/net/tipc/socket.c
> index 84cf2f805ee9..0bc60e8fc8e2 100644
> --- a/net/tipc/socket.c
> +++ b/net/tipc/socket.c
> @@ -2976,6 +2976,9 @@ int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb)
> 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);
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list