From owner-freebsd-bugs@freebsd.org Sat Jan 30 15:27:09 2021 Return-Path: <owner-freebsd-bugs@freebsd.org> Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0EFA44F0633 for <freebsd-bugs@mailman.nyi.freebsd.org>; Sat, 30 Jan 2021 15:27:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4DSdNr6rmZz4gr8 for <freebsd-bugs@freebsd.org>; Sat, 30 Jan 2021 15:27:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id EB1184F05AE; Sat, 30 Jan 2021 15:27:08 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAD714F0266 for <bugs@mailman.nyi.freebsd.org>; Sat, 30 Jan 2021 15:27:08 +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 4DSdNr6F9lz4gP2 for <bugs@FreeBSD.org>; Sat, 30 Jan 2021 15:27:08 +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 BF02717D98 for <bugs@FreeBSD.org>; Sat, 30 Jan 2021 15:27:08 +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 10UFR8Ma014884 for <bugs@FreeBSD.org>; Sat, 30 Jan 2021 15:27:08 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 10UFR8Ah014883 for bugs@FreeBSD.org; Sat, 30 Jan 2021 15:27:08 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: bugs@FreeBSD.org Subject: [Bug 253096] TCP MD5 regression on STABLE/13 Date: Sat, 30 Jan 2021 15:27:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-STABLE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: zarychtam@plan-b.pwste.edu.pl X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: <bug-253096-227@https.bugs.freebsd.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Bug reports <freebsd-bugs.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-bugs>, <mailto:freebsd-bugs-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-bugs/> List-Post: <mailto:freebsd-bugs@freebsd.org> List-Help: <mailto:freebsd-bugs-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-bugs>, <mailto:freebsd-bugs-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 30 Jan 2021 15:27:09 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253096 Bug ID: 253096 Summary: TCP MD5 regression on STABLE/13 Product: Base System Version: 13.0-STABLE Hardware: amd64 OS: Any Status: New Keywords: regression Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: zarychtam@plan-b.pwste.edu.pl Created attachment 222023 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D222023&action= =3Dedit A sample of MD5 signed traffic I was testing net/bird on 13.0-ALPHA3 and found that BGP MD5 signed IPv4 session with another instance of Bird running on stable/11 cannot be established. Please let me describe the scenario. On affected machine running 13.0-ALPHA I have: # cat /etc/ipsec.conf=20 flush ; add 172.31.1.2 172.31.1.6 tcp 0x1000 -A tcp-md5 "abigpassword" ; add 172.31.1.6 172.31.1.2 tcp 0x1001 -A tcp-md5 "abigpassword" ; # setkey -D 172.31.1.6 172.31.1.2 tcp mode=3Dany spi=3D4097(0x00001001) reqid=3D0(0x00000000) A: tcp-md5 61626967 70617373 776f7264 seq=3D0x00000000 replay=3D0 flags=3D0x00000040 state=3Dmature=20 created: Jan 30 15:32:23 2021 current: Jan 30 15:54:43 2021 diff: 1340(s) hard: 0(s) soft: 0(s) last: Jan 30 15:33:05 2021 hard: 0(s) soft: 0(s) current: 440(bytes) hard: 0(bytes) soft: 0(bytes) allocated: 131 hard: 0 soft: 0 sadb_seq=3D1 pid=3D7647 refcnt=3D1 172.31.1.2 172.31.1.6 tcp mode=3Dany spi=3D4096(0x00001000) reqid=3D0(0x00000000) A: tcp-md5 61626967 70617373 776f7264 seq=3D0x00000000 replay=3D0 flags=3D0x00000040 state=3Dmature=20 created: Jan 30 15:32:23 2021 current: Jan 30 15:54:43 2021 diff: 1340(s) hard: 0(s) soft: 0(s) last: Jan 30 15:33:05 2021 hard: 0(s) soft: 0(s) current: 4111(bytes) hard: 0(bytes) soft: 0(bytes) allocated: 52 hard: 0 soft: 0 sadb_seq=3D0 pid=3D7647 refcnt=3D1 On machine running stable/11 I have: # cat /etc/ipsec.conf flush ; add 172.31.1.6 172.31.1.2 tcp 0x1000 -A tcp-md5 "abigpassword" ; add 172.31.1.2 172.31.1.6 tcp 0x1001 -A tcp-md5 "abigpassword" ; # setkey -D 172.31.1.2 172.31.1.6 tcp mode=3Dany spi=3D4097(0x00001001) reqid=3D0(0x00000000) A: tcp-md5 61626967 70617373 776f7264 seq=3D0x00000000 replay=3D0 flags=3D0x00000040 state=3Dmature=20 created: Jan 30 15:18:20 2021 current: Jan 30 15:55:13 2021 diff: 2213(s) hard: 0(s) soft: 0(s) last: Jan 30 15:26:32 2021 hard: 0(s) soft: 0(s) current: 8031(bytes) hard: 0(bytes) soft: 0(bytes) allocated: 101 hard: 0 soft: 0 sadb_seq=3D1 pid=3D85243 refcnt=3D1 172.31.1.6 172.31.1.2 tcp mode=3Dany spi=3D4096(0x00001000) reqid=3D0(0x00000000) A: tcp-md5 61626967 70617373 776f7264 seq=3D0x00000000 replay=3D0 flags=3D0x00000040 state=3Dmature=20 created: Jan 30 15:18:20 2021 current: Jan 30 15:55:13 2021 diff: 2213(s) hard: 0(s) soft: 0(s) last: Jan 30 15:33:05 2021 hard: 0(s) soft: 0(s) current: 10226(bytes) hard: 0(bytes) soft: 0(bytes) allocated: 131 hard: 0 soft: 0 sadb_seq=3D0 pid=3D85243 refcnt=3D1 So far, everything looks fine, now for easier debugging I take nc(1) and tr= y to transmit some signed TCP segments. They arrive from stable/11 to stable/13 = as signed correctly, but the responding traffic is reported to be signed incorrectly (please see attached dumps). The handshake looks fine, but the segments send later from the affected stable/13 have invalid signatures wha= t is reported accordingly on both sides. --=20 You are receiving this mail because: You are the assignee for the bug.=