nuageinit: validate set-name to prevent shell injection in variable names
Shell variable names cannot be safely quoted with shell_escape() —
only alphanumeric characters are valid. Add validation that set-name
only matches [a-zA-Z0-9]+; invalid values are rejected with a
warning and the rename is skipped entirely.
nuageinit: use single-quote shell escaping for hostname in rc.conf.d
The hostname value was written inside double quotes in
/etc/rc.conf.d/hostname. POSIX shell performs command substitution
inside double quotes, so a hostname containing $() or backticks would
be executed when the file is sourced (e.g., by rc(8)).
Switch to using the existing shell_escape() helper, which wraps values
in single quotes. In POSIX shell, single-quoted strings are completely
literal — no expansion or substitution of any kind is performed.
While the hostname is already validated to contain only
[a-zA-Z0-9.-], this change provides defense-in-depth so the output
format is safe regardless of future validation changes.
Reported by: Yazdan Soltani <yazdan.soltani at gmail.com>
devd/snd.conf: Handle absent control device properly
If virtual_oss is not enabled when these rules run on startup, dmesg
will show the following messages:
Starting devd.
virtual_oss_cmd: Could not open control device: /dev/vdsp.ctl: No such file or directory
virtual_oss_cmd: Could not open control device: /dev/vdsp.ctl: No such file or directory
Reported by: olce, Mark Millard <marklmi at yahoo.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
biology/linux-foldingathome: Add manual page fahclient(8) and clean up
Move all documentation to fahclient.8.
Reference the new manual page from pkg-message and the rc script.
Remove outdated --chdir handling. The flag is gone from fah-client and
rc(8) handles that automatically.
Remove an incorrect description of what fahclient_flags does.
Allow fahclient_team and fahclient_donor to be empty. This way we avoid
warnings when the configuration file overrides the command-line flags,
e.g.:
14:25:24:W :Option 'user' already set to 'Anonymous' reseting to '0mp'.
14:25:24:W :Option 'team' already set to '11743' reseting to '11743'.
Pass --log-to-screen=true to showconfig's flags. This way we can
[7 lines not shown]
netlink: Avoid potential undefined behaviour
Taking the address of an OOB array element is UB, even if not
dereferenced.
Reviewed by: des, bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57172
(cherry picked from commit 4d125ed6e7d445d574c11dc35c40ec3013559806)
elfdump: Decode SHT_LLVM_ADDRSIG section header type
Reported by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 3c07cfb25283d93f03cdac51158289853d0e17a8)
netlink: Avoid undefined behaviour
Even though it is not dereferenced, it is UB to take the address of an
out of bounds array element.
Reviewed by: pouria, bz, des, adrian
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57158
(cherry picked from commit 1a4ad649cb135501f0bee56a4214e8c904ca402e)