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]
Message-ID: <CAHmME9r3bROD=jAH-598_DU_RUxQECiqC6sw=spdQvHQiiwf=g@mail.gmail.com>
Date:   Mon, 3 Feb 2020 18:29:52 +0100
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        syzbot <syzkaller@...glegroups.com>,
        WireGuard mailing list <wireguard@...ts.zx2c4.com>
Subject: Re: [PATCH net] wireguard: fix use-after-free in root_remove_peer_lists

Hi Eric,

On Mon, Feb 3, 2020 at 6:19 PM Eric Dumazet <edumazet@...gle.com> wrote:
> diff --git a/drivers/net/wireguard/allowedips.c b/drivers/net/wireguard/allowedips.c
> index 121d9ea0f13584f801ab895753e936c0a12f0028..3725e9cd85f4f2797afd59f42af454acc107aa9a 100644
> --- a/drivers/net/wireguard/allowedips.c
> +++ b/drivers/net/wireguard/allowedips.c
> @@ -263,6 +263,7 @@ static int add(struct allowedips_node __rcu **trie, u8 bits, const u8 *key,
>         } else {
>                 node = kzalloc(sizeof(*node), GFP_KERNEL);
>                 if (unlikely(!node)) {
> +                       list_del(&newnode->peer_list);
>                         kfree(newnode);
>                         return -ENOMEM;
>                 }
> --
> 2.25.0.341.g760bfbb309-goog

Thanks, nice catch. I remember switching that code over to using the
peer_list somewhat recently and embarrassed I missed this. Glad to see
WireGuard is hooked up to syzkaller.

I've queued this up in my stable tree, and I'll send this back out in
a few days:
https://git.zx2c4.com/wireguard-linux/commit/?h=stable&id=3492daa8815770038c9da36382dc66cea76ad4fc

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ