From nobody Mon Sep 28 16:20:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4htmkY6GWhz6WtDV for ; Mon, 28 Sep 2026 16:20:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4htmkY58Dvz4X5b for ; Mon, 28 Sep 2026 16:20:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790612437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4geTB8GHkIA+L3rOdQq3gIgEmN1+kloQHVU6qFOfEfs=; b=XpAAcieSKDXT5xOzImdJv4nub6mOpVTmuR5/198YBmewCIHhoY1Vi/GDYRMNAGusOSbE5S v+dHPp1s4p0F5qhxyfu8f8fPKXW/gfUDjxM6r7YZ8YukPK+NxgfTfFwnkNMWpur0JZ7iHW 5QQzdFg65YdPy5R3P9qRWpDxUKG26JAv3xZx+ebc7GG+Yeg8beF4u1p894lJqxXc4i4Plj FyxQf0FCeQWfuFLz1cuHLGMDzI1FVCxnmQypgzdc4KxGllQpJW7mA51I4Kk2bvzvgU+rpe wlooiWD84/2KBSum2hSlilpTi4iPzLds1c2Ab+2dHEBlay2RoslKsmp7TR8ZRA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790612437; b=XE81j8RMKjLlcwgjVt0okXDh9l5W/XOrJ+iWuSZVQKCBEOVJsK1aXBZf3RkOLaMWF+d+/H TzprDsnRkWetiLZwT9741SH3Dh17MA3cQB9gQn0MUHo1UcM80UD8hV1Zixs0k5S0Z0mob1 nPoK+N73YPpScPpTlwGn236IyAkz46gUxJRpK0oxvTBvGkrSY7xAG36fI8MaIE3AERcddW DVxBvnRnqJrS/UcnmVoHDLreve1tsvabf4jc0c/NoyRg099k37O5hDHkk4VWYQR3W44uKu bw+KGkqgFN4FzofgGbD327SnocEgfaynymHjVT72mK0kfTOVtJEgzeiMYhmbLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790612437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4geTB8GHkIA+L3rOdQq3gIgEmN1+kloQHVU6qFOfEfs=; b=TwyudPCoE7eeCtgJ+uSg2yK0UhcyRnG3HSCVQz+I9bcer/PZeYPIw2nw7G/faR2kfv0vZ8 qIuiiQH1z39T8H6Xg+crYpEy3FY8YERrPMkOBnX2CbTHgjDbYob8BGZOo4VrOJhGEcmIpS vBfwqAzQKyHe0/wYZcZMuhft1VJg/EwOtpNEO92iZNxq0czVNzCAY8OWnXC0u+uOFjRYFk WxAHDDFLu+B9/mFHCRAgLkG2wwiD8WflCHE19nM8DIWz/H4k+D95Q/hBhnZCW2LMwgrUqK HEmLJ5pG5K1fKCnMeC/375woz0s6u28dxldVI5IswcC2PuBAKsCkQvGoowsv2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4htmkY3tFZzc02 for ; Mon, 28 Sep 2026 16:20:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 263f9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 28 Sep 2026 16:20:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 809221661a81 - stable/14 - udp: Let jail policy rewrite the dstaddr for v6 sendto()s List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 809221661a8136a19661e4e379a44203e0ea2a03 Auto-Submitted: auto-generated Date: Mon, 28 Sep 2026 16:20:37 +0000 Message-Id: <6aba93d5.263f9.693051e6@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=809221661a8136a19661e4e379a44203e0ea2a03 commit 809221661a8136a19661e4e379a44203e0ea2a03 Author: Mark Johnston AuthorDate: 2026-09-21 14:05:01 +0000 Commit: Mark Johnston CommitDate: 2026-09-28 14:06:34 +0000 udp: Let jail policy rewrite the dstaddr for v6 sendto()s When performing an unconnected sendto() on a v6 UDP socket in a classic jail, we were not applying the usual policy of replacing the loopback addr with the jail's primary IP. Compare with, e.g., udp6_connect() or the IPv4 udp_send(). Fix that. Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Reviewed by: bz, glebius MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D59772 (cherry picked from commit fecb9537a83b6746bc731a7cb3bcf6a33df79562) --- sys/netinet6/udp6_usrreq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 4622556adcfa..fcb218dcc677 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -823,6 +823,10 @@ udp6_send(struct socket *so, int flags_arg, struct mbuf *m, ("%s: sin6(%p)->sin6_addr is v4mapped which we " "should have handled.", __func__, sin6)); + error = prison_remote_ip6(td->td_ucred, &sin6->sin6_addr); + if (error != 0) + goto release; + /* This only requires read-locking. */ error = in6_selectsrc_socket(sin6, optp, inp, td->td_ucred, scope_ambiguous, &in6a, NULL);