lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 Nov 2013 18:29:02 -0200
From:	Geyslan Gregório Bem <geyslan@...il.com>
To:	Geyslan Gregório Bem <geyslan@...il.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Arvid Brodin <arvid.brodin@...n.com>,
	"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net/hsr: Fix possible leak in 'hsr_get_node_status()'

2013/11/14 Geyslan G. Bem <geyslan@...il.com>:
> If 'hsr_get_node_data()' returns error, going directly to 'fail' label
> doesn't free the memory pointed by 'skb_out'.
>
> Signed-off-by: Geyslan G. Bem <geyslan@...il.com>
> ---
>  net/hsr/hsr_netlink.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/hsr/hsr_netlink.c b/net/hsr/hsr_netlink.c
> index 4e66bf6..aef8429 100644
> --- a/net/hsr/hsr_netlink.c
> +++ b/net/hsr/hsr_netlink.c
> @@ -249,7 +249,7 @@ static int hsr_get_node_status(struct sk_buff *skb_in, struct genl_info *info)
>                         &hsr_node_if2_age,
>                         &hsr_node_if2_seq);
>         if (res < 0)
> -               goto fail;
> +               goto nla_put_failure;
>
>         res = nla_put(skb_out, HSR_A_NODE_ADDR, ETH_ALEN,
>                                         nla_data(info->attrs[HSR_A_NODE_ADDR]));
> --
> 1.8.4.2
>

It's a Coverity catch: CID 1128855.

-- 
Regards,

Geyslan G. Bem
hackingbits.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ