From nobody Mon Sep 04 18:00:37 2023 X-Original-To: freebsd-arm@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 4Rfbys6fBDz4smyh for ; Mon, 4 Sep 2023 18:00:37 +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 4Rfbys3v47z3KPQ for ; Mon, 4 Sep 2023 18:00:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693850437; a=rsa-sha256; cv=none; b=XFsVVZeBetpJg+LiI7iQRFxNKuv7+MrZwZ1/jm9cYYH/J3FPD/apcvYdvRo9Rb0I63Dgkr 6FZv7gZyw1Gfj0EwlofEdHhQ6rJJeVoJAwPp1vz/WxTXcvJozOdpsYzcTWERkNgcQjVmF3 bEMR87mqNsG7oBgK+VFy3ZnQU/Vl2Dm6pN/OtGbw6eSdouXZFdJ/t39TjRt0GEY+2YVjoP SKc+CY4TizQwvbEIjWLfGLwRblK/W31a08AWtdK/g5WO0aELawpxz3piq7OkYC+Hi1Mkwj NywfDR6jBtajkcoA+ZmP3o23F/T4E9Xbq5QH1iZD4FcUWUeDQ4gBRFdvbvX5RA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693850437; 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=QjEMtqgvKFmMMeYa30WR08z1dpi6YsCCCHTED8iyNgA=; b=O8VhwtIEYy5l8LfLIXgfVHYPTuuvhWPeZhtxJEA9/yKajZlVyrgGXJ0C3lTCi2Bg18pJbn TA0oRfbVXa7jwXPGUvbMWjUfsB/1EOksin1sSEg02RsmUQ4eP/oVDEK9s98+1rBjIqylq+ Gvt1IxwrlhDGxWynhwzCswBglZm3HU/M3NRKAkdH9TnXi5UmtT5bu+GejzlhsBnh8sNuTA x03NqShQDLziXLPJYzrNVhskVD3DBLowcgrZODPNnWDSS2K0urZyPVJAvbY4lszUUV53m/ UdNanIDnXWKyq+ZGq38QZCSvoaNH7CjmuwU4NoWGdy+VG7B/MVpXdRWfgn8c2w== 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 4Rfbys2whtz1Fy1 for ; Mon, 4 Sep 2023 18:00:37 +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 384I0bUl049480 for ; Mon, 4 Sep 2023 18:00:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 384I0bmb049479 for freebsd-arm@FreeBSD.org; Mon, 4 Sep 2023 18:00:37 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: freebsd-arm@FreeBSD.org Subject: [Bug 273566] stray characters contaminate serial console Date: Mon, 04 Sep 2023 18:00:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: fbsd@www.zefox.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter 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: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273566 Bug ID: 273566 Summary: stray characters contaminate serial console Product: Base System Version: CURRENT Hardware: arm OS: Any Status: New Severity: Affects Only Me Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: fbsd@www.zefox.net From time to time serial console connections on raspberry Pi (2, 3 and 4) systems allow stray characters to enter serial console commands. Since the console is often used by root, this seems potentially insecure.=20 The setup consists of a pair of Pi's. One holds a usb-serial adapter, with the serial end connected to a second Pi's console uart. Connection=20 is established by ssh into the first Pi, starting tip or cu, and then logging into the second Pi into the usual way. Often, login is to root. Often, the ssh connection to the first Pi drops spontaneously. It can be re-established by repeating the connection procedure, if the original shell running on the second Pi's serial console is still running the old session remains up and prior commands can be run from history. When that is done, sometimes the apparent "last words" to the second Pi appear to be things that were never intentionally entered before the=20 disconnect. Here's one example, in this case the terminal session is running on a Pi4 running RasPiOS, the ssh connection is to a Pi2 running FreeBSD 14.0-ALPHA4 armv7 1400097 (GENERIC) #1, the Pi running the serial console is running 15-current:client_loop: send disconnect: Broken pipe bob@raspberrypi:~ $ ssh 192.168.1.13 Password for bob@generic: Last login: Mon Sep 4 08:14:21 2023 from 192.168.1.10 FreeBSD 14.0-ALPHA4 armv7 1400097 (GENERIC) #1 stable/14-n265029-d6fec2dacf= 80: Mon Sep 4 02:12:35 PDT 2023 Welcome to FreeBSD! Release Notes, Errata: https://www.FreeBSD.org/releases/ Security Advisories: https://www.FreeBSD.org/security/ FreeBSD Handbook: https://www.FreeBSD.org/handbook/ FreeBSD FAQ: https://www.FreeBSD.org/faq/ Questions List: https://www.FreeBSD.org/lists/questions/ FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc For other languages, replace "en" with a language code like de or fr. Show the version of FreeBSD installed: freebsd-version ; uname -a Please include that output and any error messages when posting questions. Introduction to manual pages: man man FreeBSD directory layout: man hier To change this login announcement, see motd(5). To see the last 10 lines of a long file, use "tail filename". To see the first 10 lines, use "head filename". To see new lines as they're appended to a file, use "tail -f filename". -- Dru bob@generic:~ % su Password: # tip ucom Stale lock on cuaU0 PID=3D1181... overriding. connected Y\HHMHLN\247\261=CD=81\315m\335u=E9=81=95\311\351=CD=A1}}=C2=A5=D1=A5=D1=A5= =C2=BD YHHMHLN=EF=BF=BD=EF=BF=BD=CD=81=EF=BF=BDm=EF=BF=BDu=E9=81=95=EF=BF=BD=EF=BF= =BD=CD=A1}}=EF=BF=BD=D1=A5=D1=A5=EF=BF=BD: Command not found. bob@pelorus:/usr/src % =C2=BD=C2=B9=C2=B9=D1=A5=C2=BD=C2=B9=C2=B1=C2=BD=CD= =95=C3=A5=C9=95=C2=B5=C2=BD=D1=95=C2=A1=C2=BD=C3=8D=C3=915)5)5)=C3=BF Too many )'s. bob@pelorus:/usr/src If one types up-arrow to recall history, the first few old "commands" are rubbish, though they are not un-displayable as would be expected from line noise (the copy-paste from FreeBSD to RasPiOS is misleading). In this example an FTDI-232 was in use, but PL2303 has behaved similarly. The origin of the disconnect is unclear. I think it's a problem with ssh between the RasPiOS terminal and the Pi holding the USB-serial=20 adapter, but don't know how to tell for sure. It seems to be load-related, with a busy FreeBSD Pi more inclined to drop connections even if the connection itself is entirely idle.=20 FWIW, stable/12 does not display this behavior, with ssh-usb-serial-console connections staying up for days or weeks. --=20 You are receiving this mail because: You are the assignee for the bug.=