[PATCH 0/8] MIPS: bound early command-line construction
From: Pengpeng Hou
Date: Sat Apr 04 2026 - 22:32:24 EST
From: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
Date: Sun, 5 Apr 2026 10:20:00 +0800
Subject: [PATCH 0/8] MIPS: bound early command-line construction
These eight fixes harden a set of MIPS early boot paths that build the
kernel command line in fixed-size buffers with unchecked appends.
The affected paths take firmware- or PROM-provided arguments and extend
`arcs_cmdline` or `fw_getcmdline()` with repeated `strcat()`, in-place
`sprintf()`, or equivalent unchecked copies. A long enough firmware
argument set can therefore run past the fixed command-line buffer during
early boot.
This series switches those constructions over to bounded concatenation
while keeping the existing boot-time behavior otherwise unchanged.
Patches:
- 1/8 MIPS: dec: bound PROM command-line appends
- 2/8 MIPS: sni: bound PROM command-line appends
- 3/8 MIPS: lemote-2f: bound machtype command-line append
- 4/8 MIPS: txx9: bound command-line reconstruction
- 5/8 MIPS: arc: bound firmware command-line construction
- 6/8 MIPS: cavium-octeon: bound default console command-line append
- 7/8 MIPS: malta-init: bound default console command-line append
- 8/8 MIPS: malta-setup: bound pci_clock command-line append
Base:
- `origin/master`
- `3aae9383f42f`
Checks:
- all 8 patches apply cleanly to the latest `origin/master`
- `checkpatch --strict` is clean on all 8 exported patch files
Thanks,
Pengpeng