#950587 rootskel: kernel argument parsing in S02module-params ignores quoting

#950587#5
Date:
2020-02-03 21:15:57 UTC
From:
To:
Dear Maintainer,

If I preseed multiple nameservers on the kernel command line, like for
example netcfg/get_nameservers="193.225.12.63 193.225.14.58", in the
installed system the following /etc/modprobe.d/local.conf appears:
----------8<----------
# Local module settings
# Created by the Debian installer

options 193.225.14 225.14.58"=193.225.14.58"
----------8<----------

Indeed, if I pass a="b c.d" on the kernel command line, the
misunderstanding is already present in the installer environment:
----------8<---------- ~ # cat /var/lib/register-module/c.params options:d"=c.d" ----------8<---------- The problematic code is S02module-params in rootskel. Proper and secure quote handling is indeed pretty hard in shell programming, but security isn't relevant in the Debian Installer context, so using shell eval seems acceptable and probably provides the easiest solution. Please consider fixing this some way. -- Thanks, Feri.
#950587#10
Date:
2022-03-23 18:24:39 UTC
From:
To:
Due to wrong cmdline parsing, the installer failed to setup debian
properly for an ARM device where MTD partitions are provided by bootloader.

The bootloader pass this cmdline:

cmdlinepart.mtdparts="spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot
Config),256k@0xc0000(NAS Config)"

The debian installer creates /etc/modprobe.d/local.conf

     # Local module settings
     # Created by the Debian installer

     options cmdlinepart
mtdparts="spi0.0:512k@0(uboot)ro,3M@0x100000(Kernel),12M@0x400000(RootFS1),2M@0x200000(Kernel_legacy),256k@0x80000(U-Boot

which is rubbish...

Regards,
Arnaud