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:   Wed, 1 May 2019 10:17:15 -0700
From:   Yi-Hung Wei <yihung.wei@...il.com>
To:     Colin King <colin.king@...onical.com>
Cc:     Pravin B Shelar <pshelar@....org>,
        "David S . Miller" <davem@...emloft.net>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        ovs dev <dev@...nvswitch.org>, kernel-janitors@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [ovs-dev] [PATCH][next] openvswitch: check for null pointer
 return from nla_nest_start_noflag

On Wed, May 1, 2019 at 6:42 AM Colin King <colin.king@...onical.com> wrote:
>
> From: Colin Ian King <colin.king@...onical.com>
>
> The call to nla_nest_start_noflag can return null in the unlikely
> event that nla_put returns -EMSGSIZE.  Check for this condition to
> avoid a null pointer dereference on pointer nla_reply.
>
> Addresses-Coverity: ("Dereference null return value")
> Fixes: 11efd5cb04a1 ("openvswitch: Support conntrack zone limit")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  net/openvswitch/conntrack.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
> index c4128082f88b..333ec5f298fe 100644
> --- a/net/openvswitch/conntrack.c
> +++ b/net/openvswitch/conntrack.c
> @@ -2175,6 +2175,10 @@ static int ovs_ct_limit_cmd_get(struct sk_buff *skb, struct genl_info *info)
>                 return PTR_ERR(reply);
>
>         nla_reply = nla_nest_start_noflag(reply, OVS_CT_LIMIT_ATTR_ZONE_LIMIT);
> +       if (!nla_reply) {
> +               err = -EMSGSIZE;
> +               goto exit_err;
> +       }
>
>         if (a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT]) {
>                 err = ovs_ct_limit_get_zone_limit(
> --
Thanks for the bug fix.  Should it be on net rather than net-next?

Acked-by: Yi-Hung Wei <yihung.wei@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ