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] [day] [month] [year] [list]
Date:	Tue, 25 Aug 2015 18:09:47 +0200
From:	Jiri Benc <jbenc@...hat.com>
To:	Cong Wang <cwang@...pensource.com>
Cc:	netdev <netdev@...r.kernel.org>, Thomas Graf <tgraf@...g.ch>
Subject: Re: use after free again...

On Mon, 24 Aug 2015 23:02:02 -0700, Cong Wang wrote:
> Hi, Jiri,
> 
> In your commit 61adedf3e3f1d3f032c5a6a299978d91eff6d555 ("route: move
> lwtunnel state to dst_entry"), how the hell could the following piece
> be correct? :-/

It's not.

> I cooked a _quick_ patch to fix it. I can send it formally if it looks
> good to you, if not, feel free to send a better fix before me.
> 
> diff --git a/net/core/dst.c b/net/core/dst.c
> index 50dcdbb..477035e 100644
> --- a/net/core/dst.c
> +++ b/net/core/dst.c
> @@ -262,11 +262,12 @@ again:
>         if (dst->dev)
>                 dev_put(dst->dev);
> 
> +       lwtstate_put(dst->lwtstate);
> +
>         if (dst->flags & DST_METADATA)
>                 kfree(dst);
>         else
>                 kmem_cache_free(dst->ops->kmem_cachep, dst);
> -       lwtstate_put(dst->lwtstate);
> 
>         dst = child;
>         if (dst) {

Looks good. You can add my
Acked-by: Jiri Benc <jbenc@...hat.com>
when you submit it.

Thanks a lot,

 Jiri

-- 
Jiri Benc
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ