From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202410 header.b=Re1iPkYd; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 406365A004F for ; Thu, 17 Oct 2024 07:33:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1729143190; bh=I2bvgICCxxSvM9kfGfituXvP4WsapzIJx9Wdo0LyfEc=; h=From:To:Cc:Subject:Date:From; b=Re1iPkYd49s4XmhGL+yrEYqLrkPo7I7qqQeFnV5s9TVUgLbghSGdaDh5nJu0cE69c eUuubr87hj46RCamMlmaNzGUEQrucGST3J3GSfsxwa+w2wljXywoip5/4Kjd3/8LBW SMtFUMIKeymtK4+i9hsmosdqwOEa2+6cE7pgbuDlA/aUnbZFTXfi4CPBT+4qW7c9KD SDuCZbF7kSWBq93LqonOiq/k70VD75W7x7eg9SYN559nEIrX+juekl/ZvKUbsNcWYN KjZ8xQ66bzTDdQdsTdH8zKm2OKvofnMDtaO8c6snWQsn9V86xEMD8Y7DHDLFwszJMb 4c/CzfQZoBAQQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XTc1f6l33z4wx5; Thu, 17 Oct 2024 16:33:10 +1100 (AEDT) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v4 0/7] Don't expose container loopback services to the host Date: Thu, 17 Oct 2024 16:32:57 +1100 Message-ID: <20241017053304.909386-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.47.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: CL3Z4SEIAZWNQOGJUZ53LUBHYSF663PD X-Message-ID-Hash: CL3Z4SEIAZWNQOGJUZ53LUBHYSF663PD X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: podman issue #24045 pointed out that pasta's spliced forwarding logic can expose services within the namespace bound only to 127.0.0.1 or ::1 to the host. However, the namespace probably expects those to only be accessible to itself, so that's probably not what we want. This changes our forwarding logic so as not to do this. Note that the podman tests will currently fail with this series, I've submitted podman PR https://github.com/containers/podman/pull/24064 to fix that. Link: https://github.com/containers/podman/issues/24045 Changes since v3: * Added several extra patches working around failures on Debian, because its dhclient-script doesn't wait for DAD to complete Changes since v2: * Add new field do structure comment Changes since v1: * Add --host-lo-to-ns-lo option to preserve the old behaviour * Clarify the new behaviour in the man page * Add some extra patches making some other corrections to the man page David Gibson (7): arp: Fix a handful of small warts test: Explicitly wait for DAD to complete on SLAAC addresses test: Wait for DAD on DHCPv6 addresses passt.1: Mark --stderr as deprecated more prominently passt.1: Clarify and update "Handling of local addresses" section test: Clarify test for spliced inbound transfers fwd: Direct inbound spliced forwards to the guest's external address arp.c | 8 ++--- conf.c | 9 ++++++ fwd.c | 31 +++++++++++++----- passt.1 | 75 ++++++++++++++++++++++++++----------------- passt.h | 2 ++ test/passt/dhcp | 2 ++ test/passt/ndp | 4 ++- test/passt_in_ns/tcp | 8 ++--- test/passt_in_ns/udp | 4 +-- test/pasta/dhcp | 2 ++ test/pasta/ndp | 3 +- test/pasta/tcp | 16 ++++----- test/pasta/udp | 8 ++--- test/two_guests/basic | 6 +++- 14 files changed, 115 insertions(+), 63 deletions(-) -- 2.47.0