From nobody Thu Jul 28 12:26:38 2022 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 4LtqdV1DlTz4Xc9v for ; Thu, 28 Jul 2022 12:26:38 +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 4LtqdT68fZz3pPR for ; Thu, 28 Jul 2022 12:26:37 +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 4LtqdT5FjBzwSZ for ; Thu, 28 Jul 2022 12:26: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 26SCQbPH042356 for ; Thu, 28 Jul 2022 12:26:37 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 26SCQblV042355 for bugs@FreeBSD.org; Thu, 28 Jul 2022 12:26: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: bugs@FreeBSD.org Subject: [Bug 265001] loader: Comments in loader.conf ignored if they contain '"' Date: Thu, 28 Jul 2022 12:26:38 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: crahman@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659011197; 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: in-reply-to:in-reply-to:references:references; bh=rvIHHPiJlpWLU25f3aVr6eNb71pmNyOPHwX4j/c/c14=; b=TCYrg5L7Zs6bhoWp9EmYD89M/EgqQUeiYxLfA8i5yQXfihLam/8xHOhU8anNyvZUOq1fn1 CdcZ5b2ISnwKxUOQtmWmB9AQ72EaCAQPYxDbGCGtVppgEClYupNobfNfp2KFCQtGLgNyox A0rK6gQzaUWMiQjslPxR4MNDRjyZn3t0YmfXTzxRpqoJMtjXVH3+OtAlAJRrPqpPe7+u47 gfTfP9TvmfhLzwXzieJ7Z5vEbaijrIPNZMdLaMI4A/rWaY5qMsdMgIWVjN/O5mozNCOCYb qgraA/uG7OCmzkkjwR99LXV6+33TYuam464aJQ3xnOEtiCdtolatq6AfZ/9Rww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659011197; a=rsa-sha256; cv=none; b=WEf6LCqjb6VOT4NLlmXAHUXBFOADozP0x0V1q0HwUfhbYPdY2h8d2tBmeE7Ypo9+9WeAfF C+MFSWLWOQ2zcr9QNHlIbbakjtVd2g6p6GVi8LuQ6q2a/ool1mgrZnz2fsbdDsNgFBLtT6 SaRos5+rVeTz2o8tXBjpbF3VnZIFh4m3yHuA3f/V5Qs8yZZ6E/3kAl6UGj4ZN6i7HiPKh6 FLjA2zC5galy/BFJuDZY0kpNhJyKB0GLULvhXOsHgYwVyePgOBtejiUJhmi5JlChnCKNcw H8ZElmHFkhygymSFFm8x4ikTvso84EMkLLs5RUvmnbQKGWJ8MIf+36dc+y2uAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265001 --- Comment #1 from crahman@gmail.com --- So the problem is that the lua parser in /boot/lua/config.lua is splitting = the line on the '=3D', sending the first match to the key and the second to the value. In the problem case, the value is: '"test b" # This is "test_directive_b"' Then the value gets matched against QVALEXPR =3D '"(.*)"'. This cleans up the value by removing the first and last '"', but in this ca= se turns it into: test b" # This is "test_directive_b which then gets rejected in processEnvVar() with MSG_FAILSYN_QUOTE, since values aren't allowed to contain '"'. Changing QVALEXPR to '([-%w_]+)' fixes this problem. Since the value is explicitly prevented from containing quotes, it's not unreasonable to load = it from an expression that excludes them. The only other place this is used i= s in the 'exec=3D"command"' expression, which also should not contain '"' in the command value. A patch is attached. --=20 You are receiving this mail because: You are the assignee for the bug.=