NetBSD Problem Report #57782

From www@netbsd.org  Mon Dec 18 16:12:34 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C8B6C1A9238
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 18 Dec 2023 16:12:33 +0000 (UTC)
Message-Id: <20231218161232.6B5AF1A923C@mollari.NetBSD.org>
Date: Mon, 18 Dec 2023 16:12:32 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: sysinst doesn't quote paths properly in shell commands
X-Send-Pr-Version: www-1.0

>Number:         57782
>Category:       install
>Synopsis:       sysinst doesn't quote paths properly in shell commands
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 18 16:15:00 +0000 2023
>Last-Modified:  Mon Dec 18 16:50:01 +0000 2023
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The NetBSD Sysinstallation
>Environment:
>Description:
Whenever sysinst passes user-specified paths through run_program with %s, any shell metacharacters such as spaces are interpreted by the shell rather than as part of the path.
>How-To-Repeat:
1. Start an install.
2. In the partition manager, create a mount point with a space in it.
3. Watch sysinst get confused.

(This will probably proceed to trigger a bug in programs that interpret fstab even if we fix sysinst, but let's take it one step at a time and open another bug for that if it comes to it.)
>Fix:
Yes, please!

>Audit-Trail:
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/57782: sysinst doesn't quote paths properly in shell commands
Date: Mon, 18 Dec 2023 16:48:42 -0000 (UTC)

 campbell+netbsd@mumble.net writes:

 >(This will probably proceed to trigger a bug in programs that interpret fstab even if we fix sysinst

 fstab knows about whitespace like:

 NAME=My\ spacey\ label /mnt ffs     rw,noauto

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.