bugzilla-daemon at mindrot.org
2025-Apr-18 19:21 UTC
[Bug 3816] New: regression: valid_hostname() refuses hostname with comma
https://bugzilla.mindrot.org/show_bug.cgi?id=3816 Bug ID: 3816 Summary: regression: valid_hostname() refuses hostname with comma Product: Portable OpenSSH Version: 10.0p1 Hardware: Other OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: scp Assignee: unassigned-bugs at mindrot.org Reporter: watanabe.yu at gmail.com Since 487cf4c18c123b66c1f3f733398cd37e6b2ab6ab, hostname with comma is refused. Hostname with comma may be used by scp, e.g. scp -v vsock,1:/etc/machine-id /tmp The commit breaks a test case in systemd: https://github.com/systemd/systemd/blob/defd5060d69ba31c1815e7d5427bde93a3db88c0/test/units/TEST-74-AUX-UTILS.ssh.sh#L65-L71 With openssh 10.0p1, the test case failed with the following: ``` [ 78.014567] TEST-74-AUX-UTILS.sh[2634]: + command -v scp [ 78.016996] TEST-74-AUX-UTILS.sh[2694]: ++ mktemp -u [ 78.019724] TEST-74-AUX-UTILS.sh[2634]: + OUT_FILE=/tmp/tmp.e3WBq62ziC [ 78.021470] TEST-74-AUX-UTILS.sh[2634]: + scp -o StrictHostKeyChecking=no -v -i /tmp/tmp.L5BYceUUfs vsock,1:/etc/machine-id /tmp/tmp.e3WBq62ziC [ 78.023570] TEST-74-AUX-UTILS.sh[2695]: Executing: program /usr/bin/ssh host vsock,1, user (unspecified), command sftp [ 78.031887] TEST-74-AUX-UTILS.sh[2697]: hostname contains invalid characters [FAILED] Failed to start TEST-74-AUX-UTILS.service. [ 78.035067] TEST-74-AUX-UTILS.sh[2695]: scp: Connection closed [ 78.037831] TEST-74-AUX-UTILS.sh[307]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.ssh.sh failed' [ 78.038431] TEST-74-AUX-UTILS.sh[307]: Subtest /usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.ssh.sh failed [ 78.039110] TEST-74-AUX-UTILS.sh[307]: + return 1 ``` -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2025-Apr-19 04:36 UTC
[Bug 3816] regression: valid_hostname() refuses hostname with comma
https://bugzilla.mindrot.org/show_bug.cgi?id=3816 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |djm at mindrot.org --- Comment #1 from Damien Miller <djm at mindrot.org> --- Comma characters are not valid in hostnames. Why is systemd using them? BTW, the strictness in hostnames is only applied to ones specified on the command-line, you can override them via the configuration file if you want to use arbitrary characters. -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2025-Apr-23 17:12 UTC
[Bug 3816] regression: valid_hostname() refuses hostname with comma
https://bugzilla.mindrot.org/show_bug.cgi?id=3816 Matthieu Baerts <matttbe at kernel.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|NEW |RESOLVED CC| |matttbe at kernel.org --- Comment #2 from Matthieu Baerts <matttbe at kernel.org> --- Hello,> Comma characters are not valid in hostnames. Why is systemd using them?The comma was used as a separator in systemd (and virtme-ng) to be able to easily connect to a VM by only giving the VSOCK CID number, e.g. scp vsock,42:/FILE . This works thanks to this config: Host unix/* unix,% vsock/* vsock,* machine/* machine,* ProxyCommand /usr/lib/systemd/systemd-ssh-proxy %h %p (...) With 'scp' and 'rsync', the slash separator cannot be used, and that's why the comma was added, see: https://github.com/systemd/systemd/pull/37035/ Note that systemd (and soon virtme-ng) has recently switched to '%' for the separator, see: https://github.com/systemd/systemd/pull/37191 Then I guess this ticket can be marked as "wontfix". -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2025-Apr-30 23:18 UTC
[Bug 3816] regression: valid_hostname() refuses hostname with comma
https://bugzilla.mindrot.org/show_bug.cgi?id=3816 Darren Tucker <dtucker at dtucker.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|10.0p1 |10.0p2 -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.