From nobody Wed May 10 12:55:52 2023 X-Original-To: bugs@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 4QGZlF0XXDz49s3X for ; Wed, 10 May 2023 12:55:53 +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 4QGZlD5wmnz3MJs for ; Wed, 10 May 2023 12:55:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683723352; 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=gJA8OR2aduswOQ8HWeU7NtrXD+QWKY2Wcw1FQoxeFJY=; b=t0k33LEIqgfYB6z4DCRQGUqIONvzOTb+O2RKK3ou0BDau5Ob2OniO0UwCz3Jk0DeFo3fHV H2DaHS+1c89Oh2/MFPUC8BBPga+Am/hgmwC/Lagb/vcsZigamuw+cRRday0uml9V2qAwfO 1+5HLFNIgrznI71pjuZ2hz6E4chcx11u0gNwHqANWx5RoEizNwsDAQKFmn6FII5Wwucr/v GNTjDXVT6m6T+WoTPbrA07XC/1CVQ/Bmmx2e3SppeFErHGnmaG9NpCGQmYE4TA59j5l3F2 pODKYA6Z2gUrsNO29vY1Dlpxi0NwgJHXhDE1IASYfTIAJgmKbnovJZpROB0oMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683723352; a=rsa-sha256; cv=none; b=MlpXUw7Ce78QUb2QlPjhZqO2p2wwVPhDhkhSbS+Qz1Ttl3tOEuPwVIiINRL9BenMjxOGF1 ZnPoPSHUia7404IpAnWK0kI/5eu62H++9y5WZRYx1HS9ZFp8vMdEdBy/QNv4XpARzmsQ9t rBELUlyzrUlRQ02kLkcrEySvVo8xc84KhePhY3Gt/TMW7cmebM7vj1AEU5e7rfRxDc3rBD txgm1fZVxQ+KKKKqA3RAJ9YhJk9XMi5tK5/Vg+/aRTo3nfTGPQRIU/1R8TtVN2tQfXP5xp 5SKpeBhcBnGpVPyuPs/m4Wl4XPXH7H8YugrceHlCT8d9pzM+kGQc21xTEXAh8w== 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 4QGZlD50Qqz19h2 for ; Wed, 10 May 2023 12:55:52 +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 34ACtqBu008073 for ; Wed, 10 May 2023 12:55:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 34ACtqZ3008072 for bugs@FreeBSD.org; Wed, 10 May 2023 12:55:52 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 271350] ftp(1) does not process file:// uris correctly Date: Wed, 10 May 2023 12:55:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: miod@online.fr 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 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271350 Bug ID: 271350 Summary: ftp(1) does not process file:// uris correctly Product: Base System Version: 13.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: miod@online.fr ftp(1) will enter an infinite loop when used in non-interactive mode with a `file://' uri as argument. This is caused by the `bufsize` local variable of `fetch_url()` in `contrib/tnftp/src/fetch.c` being only set to a non-zero value when sockets= are created to fetch files from the network. Because of this, the loop-until-all-the-contents-are-read starting on line 1215 always computes a value of 0 for `bufrem`, does not perform any I/O, and basically spins hogg= ing the cpu. How to reproduce: $ cd /tmp && ftp file:///etc/passwd Expected result: copy of /etc/passwd in /tmp Observed result: progress bar at 0%, no ETA, one cpu spinning Workaround: Use fetch(1). --=20 You are receiving this mail because: You are the assignee for the bug.=