From nobody Wed Feb 1 02:56:14 2023 X-Original-To: dev-commits-src-branches@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 4P664b29gRz3bqRc; Wed, 1 Feb 2023 02:56:15 +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 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 4P664Z5xJlz4M4W; Wed, 1 Feb 2023 02:56:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675220174; 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=EPec7C6z4O9JWLcvhqnCvDyYKVeNQ5niDRs2fdSiCzo=; b=aSLd7W0zgy2DLubDchlxCy/Kvc2yVOSHJMKKCeizCJd33MStG3hgNQmlDa+b6LlatUhdmT LYF2Tf0OM6l9jN4VWbOR2I/frm1iT4Yfl0liWnAQDZxGze/vTPNS+0413+H5fuIMpy6zV+ wHAXI53d7dk1Es5Lb6RNGP041b5HUUyeyNpUm1Er96fPzY+Kf1WdJhG7jnawMa+QOgnkcs hYxcVaPGd+4DC3hzASWRr4HwmahgPtz2vlMAK4GRdUTH/ZT8uXq0DWVtjC/cebTio9ZH5s LDPGg9bCYHzp6HJiQ/c79Fmn2e3xBSXq3VKxnfFs4mY+xrNQIlwl2Ii9HoH8NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675220174; 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=EPec7C6z4O9JWLcvhqnCvDyYKVeNQ5niDRs2fdSiCzo=; b=EwTarJP6IGAD5dkjcZbblkUBDO9MTZJSZUlSx+2WCfLiG4QYeDGgQUTU1/+mrclEEIrKeM CoDl6/YUWhlvVYKNcoCjRE1pA98R2/hKEsx1AJz3mFaNBd8kSjTpToeTuAuy2CM0aOyXEE TuxClbR6lA62BXrYFJzsZV2PtL2G2QqOzSlOWbuCfdrsRv5Oszug+2znVSL1hz+rg9Wj1q /OUvUFdHHoSUIzb723AloIfISP1gKzriIbQFS9K03X4OZY3oA94qx4t0TDMIsGjxlmexBu WbK5mAmkFdNSA2K2/5DzxQLp5jDH37aLZDDhxRW69elfeHodYnNyhktLWq4VQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675220174; a=rsa-sha256; cv=none; b=vbB9EpVSbYMeJrzPqSOLk99ENIMGYS1pqIm8AXUmdDMkyQPSJ1qtsJ4DFLbZ6o3ssbaW4J hiSmXVs8OkMCVVWZKZsGsPub+uo8pVqpk5hD8b+6uRfuEh7R14OdsLAag+4i/Nh5TicZGS ++HdONOw0SBv0MNKKC/96txH9JcwbeF1eQDZL4+s2S0KaNAmEiS9UCVUzW32XO0+PiIuvu SIlUL+PMOP9xitKAX+rRTHIhM76ofYhhMopufO4g09sTiKxcaACuuLKsomlDO2iCJZaBeg nO4GC6mwrG7EjFC/FgmzQPZAFAPBT74Bc6g8vHL8ttpgM2uTxt1R2A6rdphlQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4P664Z51VDz1C04; Wed, 1 Feb 2023 02:56:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3112uE57006716; Wed, 1 Feb 2023 02:56:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3112uETk006715; Wed, 1 Feb 2023 02:56:14 GMT (envelope-from git) Date: Wed, 1 Feb 2023 02:56:14 GMT Message-Id: <202302010256.3112uETk006715@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 3512eda8e078 - stable/12 - network.subr: Fix infinite loop List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3512eda8e078d1ca49f6c3ec74eb78d6f373b66b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=3512eda8e078d1ca49f6c3ec74eb78d6f373b66b commit 3512eda8e078d1ca49f6c3ec74eb78d6f373b66b Author: Cy Schubert AuthorDate: 2022-12-14 21:41:10 +0000 Commit: Cy Schubert CommitDate: 2023-02-01 02:55:19 +0000 network.subr: Fix infinite loop When setting up carp tunnel, using a password consisting of only the characters used as hexadecimal characters, i.e. abc-def, there will be an infinite loop in the shell function ifalias_af_common_handler(). To circumvent this we test for " pass ". PR: 268378 Reported by: jyoung15@gmail.com Differential Revision: https://reviews.freebsd.org/D37748 (cherry picked from commit e3e57edf4aac05d041ca55ff2f008c6109ef88d5) --- libexec/rc/network.subr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libexec/rc/network.subr b/libexec/rc/network.subr index 793784f8c927..ada4b8d138cc 100644 --- a/libexec/rc/network.subr +++ b/libexec/rc/network.subr @@ -1048,6 +1048,9 @@ ifalias_af_common_handler() # Process the last component if any. if [ -n "${_tmpargs}" ]; then case $_tmpargs in + ${_af}[[:space:]]pass[[:space:]]*) + ${IFCONFIG_CMD} $_if $_tmpargs $_action && _ret=0 + ;; ${_af}[[:space:]]*[0-9a-fA-F]-*) ifalias_af_common_handler $_if $_af $_action \ `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}[[:space:]]}`