From nobody Mon Nov 02 13:25:05 2026 X-Original-To: dev-commits-src-main@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 4jJC9t2jTSz6yLpP for ; Mon, 02 Nov 2026 13:25:06 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jJC9s6pH8z3NW9 for ; Mon, 02 Nov 2026 13:25:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793625906; 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=oPGfWQCQitk99arylth2gaFHh9Ux/trRqX0/Q2rnfP0=; b=lABaOT0GLbon7wWoEa/N0HOMTZV56J1egjtYNFvqVAG12N9ui6cWUIODi5aU9fxvV1FJ7R 8XvK+2y56FSArW2j2K796gaJ5IjAlUPa74rVu4LzI5Hia8q5K22E+bnL6Nft02aHWa5HbA SU6by1K8GTWYGuOzwEHFjHdMK3PcpFJc8k37YV0p2VfF2NDlT0PFUVaF3yLAfifl3HBkNS E9xGzWFZBLT9ZEoAv4oXjsVEemezsdYE2qu+x4t5Ml9SqjFm0jMtm5NBmDQgPIl950NmjV K6TwZUtJZUgekqpXEN4dandY9M442Rqbe2N7ZC/KPDKQUJKOAJQJIhbMvk1q9Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793625906; b=ikZ37zzJ1ofObzPd30UpT/I1PihUMVHhkHSjI7EuIidqGP+wINpeRYFa33cARlF/6O/NMj 9P8a4pPNVz7rLCS2rmAS8jQGdtc1TWv9FY2H4m7LchiTabZcooVptkdkywYBj6+67MxJtE 61uFk66BIVr7v2STIezMyERVn5vbsvs7TlEhjP5MWGZ+6dw7sLDtpTVGmSmGcPK68kH7Qt Z3id5Kfk70s4NzAIBCXeFqIL7xQ4rgmgqUICV6Pg/1CJaJhQojiGCmOepeJV98Rwm/Ukdl MKjaE6dhy/bpST/ZwNvYH1RCAiMaRdAWFQkIudkmPm0mxbKlYWua5kylPDy/Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793625906; 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=oPGfWQCQitk99arylth2gaFHh9Ux/trRqX0/Q2rnfP0=; b=sPNNTCKNIhKVQTkIU9PtrQF8C8RVj9moEr/9i5S5a9eHGv2OoBp77CUyxTDXcgK+jMkDlF 6Ipr09Qr4o9spGyMjQ3CXg0JAwIV/57ApXaPY//LKQbz1EWJ232FJLu0D1jtEwT+gKledu VyTSf60MUpc1T7YpMlP94iCEPO7aOK68Aoejeq+pQzMqv7C7/ZjXrc1VGvzy/S27su+5ym g0407Mq6eK1uR0t5xSGIlgN0m9zcSHMtsOkzYKFdDS6V4WNdXVuxWdxChkkT6J+D1KhzpV MNzwrn5O0kZKg2lsva8676x3K8BFm7WjCsFabpFPFDxGJ3hctoojWFzGrepuHg== 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 4jJC9s6DZKznk6 for ; Mon, 02 Nov 2026 13:25:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 364b5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 02 Nov 2026 13:25:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: d8b2c298a117 - main - pfsync: improve underflow check List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: Commit messages for the main branch of the src repository 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8b2c298a117416a57cad176718b87eb504bfb49 Auto-Submitted: auto-generated Date: Mon, 02 Nov 2026 13:25:05 +0000 Message-Id: <6ae88f31.364b5.30a16624@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d8b2c298a117416a57cad176718b87eb504bfb49 commit d8b2c298a117416a57cad176718b87eb504bfb49 Author: Kristof Provost AuthorDate: 2026-11-02 09:50:30 +0000 Commit: Kristof Provost CommitDate: 2026-11-02 12:40:01 +0000 pfsync: improve underflow check We checked the state's expiry time to make sure it was large enough to not underflow if we subtracted the already expired time from the remote end, but we failed to account for the state's expiry time being in miliseconds and the pfsync time delta being in seconds. Take that multiplication by 1000 into account. Fixes: 78b620b781b0 (pfsync: avoid underflow on different timeouts, 2026-10-21) Reported by: markj's Post-Commit LLM Review Service Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/if_pfsync.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 97688294bebc..0f649ecee8ad 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -872,9 +872,9 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) * Ensure we don't over/under flow if our local timeout or * uptime is lower than the remote timeout. */ - if (timeout > expire && st->expire > (timeout - expire)) - st->expire -= (timeout - expire) - * 1000; + if (timeout > expire && + st->expire > ((timeout - expire) * 1000)) + st->expire -= (timeout - expire) * 1000; } if (! (st->act.rtableid == -1 ||