Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07D5D313548 for ; Fri, 19 Sep 2025 15:28:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758295709; cv=none; b=KANEE8tU2UwDBr9pzm+o0nOkEJNc7i3Q6c6ERTrCWOsa25RUlw3DmlBIf+mBgM+jPRKiWI2WsRvlY9hu9kaE1+i9l+01FbNThvB//1c1XRYbKnCin5/WWj/CaZr4BVnyjLKE08NDiSf8rRpBjsWHd6UfsSsMwDPuJ6cigEWQJzY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758295709; c=relaxed/simple; bh=F0IRWN36dCvY5wkZtu5q+FE6PxGitpkTrilIrGkQkAg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AgxcMgAWF1n8rTVOpNie+7EfXUvGiIrkzpRQNzACZGGd+aYKOxeatSAXXInR9whsQLkvLCbrWKwPd9z1YVLWfksdPzXOk1/oz28m+RQp0tmgEj33hRejLQsHfpAF3fK3xju9HB5ZGDunFStvvt+jwSWwYI1JIwIS1BJUpWozxt4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZKCsyUWs; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ZKCsyUWs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B9F6C4CEF0; Fri, 19 Sep 2025 15:28:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758295708; bh=F0IRWN36dCvY5wkZtu5q+FE6PxGitpkTrilIrGkQkAg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ZKCsyUWsZY1uEj96XmQ4hJQ7xN3Z4w3oOnYK6Uzev5a79DeNWEnLaoFvGTNMMcxf5 A3Uv6TNYFGEyrVPKpNAueRoJtO4z++ya+3X9jFi6hfwUME5IgMeGwufaSSdUBvHREh QJCN3wRvk5Jw6MW/o1bG06c2GNJ3BuPthj0I/jKc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39850: vxlan: Fix NPD in {arp,neigh}_reduce() when using nexthop objects Date: Fri, 19 Sep 2025 17:28:14 +0200 Message-ID: <2025091904-CVE-2025-39850-a495@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=4826; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=QuWfxwKv72AZlO6B0KraiEtQ69gg5OH2h8mbjjHWd8E=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlny1o8V2s3R13OCFumpD7PzHhylooo422TL4/5S9kK1 /yYenpLRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzk/Q6GBUcWctVc/sImKqKU HMl2a4tL4Kf41wzz6865bGH4wqjL++h/3uG739NrDepeAAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: vxlan: Fix NPD in {arp,neigh}_reduce() when using nexthop objects When the "proxy" option is enabled on a VXLAN device, the device will suppress ARP requests and IPv6 Neighbor Solicitation messages if it is able to reply on behalf of the remote host. That is, if a matching and valid neighbor entry is configured on the VXLAN device whose MAC address is not behind the "any" remote (0.0.0.0 / ::). The code currently assumes that the FDB entry for the neighbor's MAC address points to a valid remote destination, but this is incorrect if the entry is associated with an FDB nexthop group. This can result in a NPD [1][3] which can be reproduced using [2][4]. Fix by checking that the remote destination exists before dereferencing it. [1] BUG: kernel NULL pointer dereference, address: 0000000000000000 [...] CPU: 4 UID: 0 PID: 365 Comm: arping Not tainted 6.17.0-rc2-virtme-g2a89cb21162c #2 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-4.fc41 04/01/2014 RIP: 0010:vxlan_xmit+0xb58/0x15f0 [...] Call Trace: dev_hard_start_xmit+0x5d/0x1c0 __dev_queue_xmit+0x246/0xfd0 packet_sendmsg+0x113a/0x1850 __sock_sendmsg+0x38/0x70 __sys_sendto+0x126/0x180 __x64_sys_sendto+0x24/0x30 do_syscall_64+0xa4/0x260 entry_SYSCALL_64_after_hwframe+0x4b/0x53 [2] #!/bin/bash ip address add 192.0.2.1/32 dev lo ip nexthop add id 1 via 192.0.2.2 fdb ip nexthop add id 10 group 1 fdb ip link add name vx0 up type vxlan id 10010 local 192.0.2.1 dstport 4789 proxy ip neigh add 192.0.2.3 lladdr 00:11:22:33:44:55 nud perm dev vx0 bridge fdb add 00:11:22:33:44:55 dev vx0 self static nhid 10 arping -b -c 1 -s 192.0.2.1 -I vx0 192.0.2.3 [3] BUG: kernel NULL pointer dereference, address: 0000000000000000 [...] CPU: 13 UID: 0 PID: 372 Comm: ndisc6 Not tainted 6.17.0-rc2-virtmne-g6ee90cb26014 #3 PREEMPT(voluntary) Hardware name: QEMU Standard PC (i440FX + PIIX, 1v996), BIOS 1.17.0-4.fc41 04/01/2x014 RIP: 0010:vxlan_xmit+0x803/0x1600 [...] Call Trace: dev_hard_start_xmit+0x5d/0x1c0 __dev_queue_xmit+0x246/0xfd0 ip6_finish_output2+0x210/0x6c0 ip6_finish_output+0x1af/0x2b0 ip6_mr_output+0x92/0x3e0 ip6_send_skb+0x30/0x90 rawv6_sendmsg+0xe6e/0x12e0 __sock_sendmsg+0x38/0x70 __sys_sendto+0x126/0x180 __x64_sys_sendto+0x24/0x30 do_syscall_64+0xa4/0x260 entry_SYSCALL_64_after_hwframe+0x4b/0x53 RIP: 0033:0x7f383422ec77 [4] #!/bin/bash ip address add 2001:db8:1::1/128 dev lo ip nexthop add id 1 via 2001:db8:1::1 fdb ip nexthop add id 10 group 1 fdb ip link add name vx0 up type vxlan id 10010 local 2001:db8:1::1 dstport 4789 proxy ip neigh add 2001:db8:1::3 lladdr 00:11:22:33:44:55 nud perm dev vx0 bridge fdb add 00:11:22:33:44:55 dev vx0 self static nhid 10 ndisc6 -r 1 -s 2001:db8:1::1 -w 1 2001:db8:1::3 vx0 The Linux kernel CVE team has assigned CVE-2025-39850 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 1274e1cc42264d4e629841e4f182795cb0becfd2 and fixed in 6.12.46 with commit e211e3f4199ac829bd493632efcd131d337cba9d Issue introduced in 5.8 with commit 1274e1cc42264d4e629841e4f182795cb0becfd2 and fixed in 6.16.6 with commit 8cfa0f076842f9b3b4eb52ae0e41d16e25cbf8fa Issue introduced in 5.8 with commit 1274e1cc42264d4e629841e4f182795cb0becfd2 and fixed in 6.17-rc5 with commit 1f5d2fd1ca04a23c18b1bde9a43ce2fa2ffa1bce Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-39850 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/net/vxlan/vxlan_core.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/e211e3f4199ac829bd493632efcd131d337cba9d https://git.kernel.org/stable/c/8cfa0f076842f9b3b4eb52ae0e41d16e25cbf8fa https://git.kernel.org/stable/c/1f5d2fd1ca04a23c18b1bde9a43ce2fa2ffa1bce