Skip to content

ssh: Guard daemon_info/1 address type before parsing - #11680

Open
u3s wants to merge 1 commit into
masterfrom
kuba/ssh/OTP-20357
Open

u3s wants to merge 1 commit into
masterfrom
kuba/ssh/OTP-20357

Conversation

@u3s

@u3s u3s commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

daemon_info/1 passed #address.address (normally an IP tuple or the atom 'any'/'loopback') straight to inet:parse_strict_address/1, relying on the old {error, einval} return for non-string input. OTP-20357 made that call crash with function_clause.

Only parse strings/binaries; leave tuples and atoms as-is. This is behaviour-preserving and drops ssh's dependence on the parser tolerating wrong-type arguments.

daemon_info/1 passed #address.address (normally an IP tuple or the
atom 'any'/'loopback') straight to inet:parse_strict_address/1,
relying on the old {error, einval} return for non-string input.
OTP-20357 made that call crash with function_clause.

Only parse strings/binaries; leave tuples and atoms as-is. This is
behaviour-preserving and drops ssh's dependence on the parser
tolerating wrong-type arguments.
@u3s u3s self-assigned this Sep 22, 2026
@u3s u3s added the team:PS Assigned to OTP team PS label Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

CT Test Results

    2 files     27 suites   10m 49s ⏱️
  524 tests   501 ✅ 23 💤 0 ❌
1 748 runs  1 709 ✅ 39 💤 0 ❌

Results for commit 6c84334.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@u3s u3s added the testing currently being tested, tag is used by OTP internal CI label Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant