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: <24cac92b-4981-4ddc-9a05-32b61799e688@iogearbox.net>
Date:   Thu, 14 Apr 2022 13:28:18 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Nikolay Aleksandrov <razor@...ckwall.org>, netdev@...r.kernel.org
Cc:     Martynas Pumputis <m@...bda.lt>,
        "Jason A . Donenfeld" <Jason@...c4.com>, wireguard@...ts.zx2c4.com,
        kuba@...nel.org, davem@...emloft.net, stable@...r.kernel.org
Subject: Re: [PATCH net 1/2] wireguard: device: fix metadata_dst xmit null
 pointer dereference

On 4/14/22 12:44 PM, Nikolay Aleksandrov wrote:
> When we try to transmit an skb with md_dst attached through wireguard
> we hit a null pointer dereference[1] in wg_xmit() due to the use of
> dst_mtu() which calls into dst_blackhole_mtu() which in turn tries to
> dereference dst->dev. Since wireguard doesn't use md_dsts we should use
> skb_valid_dst() which checks for DST_METADATA flag and if it's set then
> fallback to wireguard's device mtu. That gives us the best chance of
> transmitting the packet, otherwise if the blackhole netdev is used we'd
> get ETH_MIN_MTU.
> 
[...]
> 
> CC: stable@...r.kernel.org
> CC: wireguard@...ts.zx2c4.com
> CC: Jason A. Donenfeld <Jason@...c4.com>
> CC: Daniel Borkmann <daniel@...earbox.net>
> CC: Martynas Pumputis <m@...bda.lt>
> Fixes: e7096c131e51 ("net: WireGuard secure network tunnel")
> Reported-by: Martynas Pumputis <m@...bda.lt>
> Signed-off-by: Nikolay Aleksandrov <razor@...ckwall.org>

Looks good to me, thanks Nik!

Acked-by: Daniel Borkmann <daniel@...earbox.net>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ