From nobody Sun Oct 26 03:15:28 2025 X-Original-To: dev-commits-src-branches@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 4cvMG85sRlz6Dn5q; Sun, 26 Oct 2025 03:15:28 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cvMG84mWhz3RRP; Sun, 26 Oct 2025 03:15:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761448528; 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=NU5Wp3pxGsZYLIQD6k1SmXjm7jj5MaLxH86ENeqjT2U=; b=YtquAhjeiAyndmNKW9tiOxmV+0ylJ/UPdyMm87CdHsVtvphR/yVp6nyq2vCF4qEfaWehHv UsMs4OFEfDkD0n/V0pg0iGja4KqUHeYDzjgMIx/NFMxB9ukqeX3YmpY5EqFxbs5K/1oJip jZMEaLhEgfOZ7091f/y8ZdFqZRytQWzhTbhiVljZlKlYXZuAAUYTtslzAJm1XX/7X9QXws vsFLr3lT04iwgp51tVBgtI/Jzvw50u2UtG8AgN7an11suFbAcT9MXwsIowZlwTGOdEzSM1 xO3bi27K/fvWrraHjwDoh+7HySbBROa++R9u05X+ENxRnvbekI17UUNIQ0HOUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761448528; 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=NU5Wp3pxGsZYLIQD6k1SmXjm7jj5MaLxH86ENeqjT2U=; b=qktwrU2eawqFTl+k9LfW0ewJbAnEid1IVwoUsJ7B9iaa3NVP0JsixbBFuN+7uP26b/ny4U iJgL4egxB3RW0A/FE4Qd/FbawbC//0DrcgVzo6wQscdTMEBUqUbZs92VHRQ3HaNhsL0Iaw JkcOAt0J3Bm3buHpohn9Nz6DjRU0W/zg2U5QynXQSa2iAYfB506e5HL0v14o5mk0nP1E9A 7CZjJbHF55L/srM+DyhhdADIGd+KXgeoIL9cVJfi1X0DnQGGVVChj0qtNpZO3KpYe6icna lVq5OQj5QLsBmZBZ/c/ixflg5BrZY3NqICrv/+XNRIxcKESi8aqAhCsANWje4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761448528; a=rsa-sha256; cv=none; b=KMppUKHLJH6DDEjVMSACirgdh+FnZMfM4PC7u5nCpf3m05AkQsDGRJl0om+BmfU6dZr8b9 Dv8/roonePL8dcwiEYMEWW+svf2bUprp53bHJVN6p15138jeWawTG4O8ts4JQljGL3xZ+b 1T4Z7omGTpzX9FTReLO7t3evIbGJAD936YWpJ3cXMdzoBqtUiA0newuQoMov908LU0PLUR dnI8pA2yZiUqtom07ZkZlcQdGs7a87rD4RmiYtFfX7U2wxUhmi0GUFxE47VGeBjhAjHny9 BFOMmYHLmR8DTvW6+f3e/fvgbDa0ImHioDrN9ggcFS/z+u5Wkj6sxNRo2CQyuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cvMG848Hvz9q; Sun, 26 Oct 2025 03:15:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59Q3FSZ0064135; Sun, 26 Oct 2025 03:15:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59Q3FSFf064132; Sun, 26 Oct 2025 03:15:28 GMT (envelope-from git) Date: Sun, 26 Oct 2025 03:15:28 GMT Message-Id: <202510260315.59Q3FSFf064132@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 2ebb4779c40a - stable/13 - ipfilter: Plug ip_htable kernel information leak List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2ebb4779c40afbaf4a0bf0b6d5364758b4c24bad Auto-Submitted: auto-generated The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=2ebb4779c40afbaf4a0bf0b6d5364758b4c24bad commit 2ebb4779c40afbaf4a0bf0b6d5364758b4c24bad Author: Cy Schubert AuthorDate: 2025-10-22 16:29:03 +0000 Commit: Cy Schubert CommitDate: 2025-10-26 03:15:13 +0000 ipfilter: Plug ip_htable kernel information leak ipf_htable_stats_get() constructs an iphtstat_t on the stack and only initializes select fields before copying the entire structure to userland. The trailing padding array iphs_pad[16] is never initialized, so ~128 bytes of uninitialized kernel stack memory can be leaked to user space on each call. This is a classic information disclosure vulnerability that can reveal pointers and other sensitive data. We fix this by zeroing out the data structure prior to use. Reported by: Ilja Van Sprundel Reviewed by: emaste Differential revision: https://reviews.freebsd.org/D53275 (cherry picked from commit 0d589ecbc7aa916537fd21c0344919491cfcb293) --- sys/netpfil/ipfilter/netinet/ip_htable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/ip_htable.c b/sys/netpfil/ipfilter/netinet/ip_htable.c index b47a1aa2d795..b56909a02bc3 100644 --- a/sys/netpfil/ipfilter/netinet/ip_htable.c +++ b/sys/netpfil/ipfilter/netinet/ip_htable.c @@ -235,6 +235,8 @@ ipf_htable_stats_get(ipf_main_softc_t *softc, void *arg, iplookupop_t *op) return (EINVAL); } + bzero(&stats, sizeof(stats)); + stats.iphs_tables = softh->ipf_htables[op->iplo_unit + 1]; stats.iphs_numtables = softh->ipf_nhtables[op->iplo_unit + 1]; stats.iphs_numnodes = softh->ipf_nhtnodes[op->iplo_unit + 1];