From nobody Sun Apr 17 18:44:59 2022 X-Original-To: net@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 17C66F7CBBD for ; Sun, 17 Apr 2022 18:45:00 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KhJs74wTGz4nd4 for ; Sun, 17 Apr 2022 18:44:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 89BBC23595 for ; Sun, 17 Apr 2022 18:44:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 23HIixPb046297 for ; Sun, 17 Apr 2022 18:44:59 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 23HIixMb046296 for net@FreeBSD.org; Sun, 17 Apr 2022 18:44:59 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 263379] [regression] [ipsec] compatibility broken between stable/12 and stable/13 opencrypto in AEAD mode Date: Sun, 17 Apr 2022 18:44:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: eugen@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: jhb@FreeBSD.org X-Bugzilla-Flags: mfc-stable13? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650221099; 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=jSgM1Ssy8AUszg4tv6WwCfAcTUvVa2RkwRvwN3nLsgg=; b=DBosPqlRBpa+iNaXjFjUMWjlEz8oXgTNsBDYmQysEQxBgmh+q1eUAfcXkLBGJ8zLg4EIle SwWH3Z3W7XL3swTnzzVJnV53OmxEMUtI2AqVmnF2Otrauk63JvJpqyQEaWZWHTakxLc41C A32aa3jBBQSHjx3stMP0Nj5IEUMBlM3m3LnUruMdA3oV3UwndLYkqRdCQOb24mwxSXS+oB lWnfH6mtEEqfxx6gtxPgo3jgCo5sUuvdJzC64OD1Ed7H0sACv79DwgXwuMPhwe3DtNTOIN 1+thlBOFdBQnlULTzAhYeeeNXyT+13rVY1NNdmKGvXZCF67KfJVbmtPxx1coMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650221099; a=rsa-sha256; cv=none; b=cD8whRMZA4CjkD4tr2so2SzdVtV8TSp/gtHgXFC2sFXI6rgjdHf3ckch1VqFgjOTaTDhRa yH3aTvh8qS92j9BDpbhlJukvXF48PFrF5H1pp9ICIFrAxN6pslcUp4w8EZbo3Uc9jv31u6 ZVtk6SyfjdSCS6ckWP9SJqcl1rWb/lUgAyFT1tnyvv8HA24DlxLK3Hm/J5ki6/onByLU1w icdLRhj5Avmu6vilzU2VeUSzmL678Jbz7FurYnP8li6qip+dG2mSKcHzYHo6MFDfrBIgFS 5dOwV9mfkBWP/u5My5pSTflBefQ9vWFQFp96WiN8kmmul56JYjLU3ZopPkyWlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D263379 Bug ID: 263379 Summary: [regression] [ipsec] compatibility broken between stable/12 and stable/13 opencrypto in AEAD mode Product: Base System Version: 13.1-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: jhb@FreeBSD.org Reporter: eugen@freebsd.org CC: net@FreeBSD.org Flags: mfc-stable13? Hi! Assume we have the following in the /etc/ipsec.conf: add 1.1.1.1 2.2.2.2 esp 7888 -m transport -E aes-gcm-16 "3#&*f738@?>=3D_fOH@0D+n1{c" -A hmac-sha2-512 "M@-#@k9?NWiuj4f04jJE(dm{4/B=3Dp9d5@7v}naW,[3!_1}4.]n-t;99L0+/14004"; Exact key values do not matter but their lenght do matter. "/sbin/setkey -f /etc/ipsec.conf" parses this just fine for both of stable/= 12 and stable/13 and sends a message over a socket to the kernel to add new SA. stable/12 kernel accepts it (and then it works) but stable/13 of 17 April 2022 rejects with EINVAL. Note that stock stable/13 kernel accepts it if you change hmac-sha2-512 to hmac-sha2-256 and halve the length of the key. Here is some preliminary and incomplete patch for stable/13 opencrypto that makes stable/13 to accept this and install new SA: http://www.grosbein.net/freebsd/opencrypto/opencrypto.diff Still, the patch does not solve the problem completely as ESP packets sent = from patched stable/13 system get dropped by stable/12 increasing error counter "packets dropped; no transform" in the output of "netstat -sp esp". Note again, that stable/12 system has another stable/12 peer with same configuration and encrypted traffic flows just fine. There is no IKE daemon= in the picture intentionally, to simplify debugging. --=20 You are receiving this mail because: You are on the CC list for the bug.=