https://bugzilla.redhat.com/show_bug.cgi?id=1857104
Bug ID: 1857104 Summary: Using FreeIPA breaks IPv4/IPv6 flags for SSH Product: Fedora Version: 32 Status: NEW Component: sssd Assignee: sssd-maintainers@lists.fedoraproject.org Reporter: ossman@cendio.se QA Contact: extras-qa@fedoraproject.org CC: abokovoy@redhat.com, atikhono@redhat.com, jhrozek@redhat.com, lslebodn@redhat.com, mzidek@redhat.com, pbrezina@redhat.com, rharwood@redhat.com, sbose@redhat.com, ssorce@redhat.com, sssd-maintainers@lists.fedoraproject.org Target Milestone: --- Classification: Fedora
Description of problem: If a client is configured using ipa-client-install then the -4 and -6 flags stop working for ssh.
Version-Release number of selected component (if applicable): Doesn't matter. Seen on RHEL 6 through 8, and on current Fedora.
How reproducible: 100%
Steps to Reproduce: 1. ipa-client-install 2. ssh -4 host.example.com
Actual results: Connected via IPv6
Expected results: Connected via IPv4
Additional info: The bug is that sss_ssh_knownhostsproxy is configured on the client and that command doesn't respect the flags given to ssh.
The issue affects all hosts, not just those part of the same FreeIPA domain.
A practical effect of this is that connections get rejected or misbehave because of IP based rules in place for this connection.
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
Pavel Březina pbrezina@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|sssd-maintainers@lists.fedo |pbrezina@redhat.com |raproject.org | Doc Type|--- |If docs needed, set a value
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
Pavel Březina pbrezina@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jjelen@redhat.com Flags| |needinfo?(jjelen@redhat.com | |)
--- Comment #1 from Pavel Březina pbrezina@redhat.com --- I can reproduce it, thank you. However, I'm not sure if proxy commands can even get ssh parameters, Jakub?
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
Jakub Jelen jjelen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(jjelen@redhat.com | |) |
--- Comment #2 from Jakub Jelen jjelen@redhat.com --- The proxy command is was not really designed around the ipa proxy command so there is really no simple way how to make this working out of the box for these ad-hoc commands. When executing proxy commands, the address family is thrown away and there is no address family token that could be passed to the proxy command.
From top of my head one solution could be introduction of address family token that could be passed to IPA proxy command alongside with the hostname and port, but it would require patches for both sss_ssh_knownhostsproxy and ssh. Let me check if OpenSSH upstream would be willing to introduce this new token.
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
--- Comment #3 from Pavel Březina pbrezina@redhat.com --- Thank you.
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
Jakub Jelen jjelen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Link ID| |OpenSSH Project 3199
--- Comment #4 from Jakub Jelen jjelen@redhat.com --- The upstream mailing list thread:
https://lists.mindrot.org/pipermail/openssh-unix-dev/2020-August/038698.html
And the bug with patch I filled:
https://bugzilla.mindrot.org/show_bug.cgi?id=3199
With this, sss_ssh_knownhostsproxy would need to learn -4 and -6 switches and ipa install would need to set-up the %f replacement character for the commandline.
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
--- Comment #5 from Pavel Březina pbrezina@redhat.com --- Sounds good to me.
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
--- Comment #6 from Jakub Jelen jjelen@redhat.com --- Pavel, one more fast solution that came to my mind would be parsing parent process command-line to get this information from ssh (ssh is always parent process). It would be trivial to catch -4 or -6 options specified on commandline, but more complicated if -oAddressFamily=inet would be user or if AddressFamily would be used from configuration files (unless we would like to parse these too).
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
--- Comment #7 from Pavel Březina pbrezina@redhat.com --- Thank you for looking into it. Given this is an SSH limitation I think it is better to wait for official solution instead of implementing some (temporary) workaround.
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
--- Comment #8 from Pavel Březina pbrezina@redhat.com --- Is there any openssh ticket that this bug can depend on?
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
--- Comment #9 from Jakub Jelen jjelen@redhat.com --- Not yet. Only the upstream links I sent in previous comments. And I am hesitant to create more downstream bugs as we do not have yes/no from upstream.
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
--- Comment #10 from Pavel Březina pbrezina@redhat.com --- Hi Jakub, I don't see any progress on the upstream ticket. Should we close this BZ? Or do you have capacity to pursue this further?
Unfortunately, we can't do anything about this without the upstream support.
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
Alexey Tikhonov atikhono@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(jjelen@redhat.com | |)
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
Jakub Jelen jjelen@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dbelyavs@redhat.com Flags|needinfo?(jjelen@redhat.com | |) |
--- Comment #11 from Jakub Jelen jjelen@redhat.com --- Sorry, no progress from my side. Upstream was not convinced with the necessity of this and I no longer maintain OpenSSH (added Dima the current maintainer for reference).
But fur the future, I believe sssd should be modified to use KnownHostsCommand instead of ProxyCommand, which will be less fragile for these corner cases. I filled an issue upstream some time ago:
https://github.com/SSSD/sssd/issues/5518
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
--- Comment #12 from Fedora Program Management fedora-pgm@bot.bugzilla.redhat.com --- This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'.
Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
Pavel Březina pbrezina@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|32 |34
--- Comment #13 from Pavel Březina pbrezina@redhat.com --- Thanks, this seems like a way to go.
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
Pavel Březina pbrezina@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|34 |rawhide
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
Andre Boscatto aboscatt@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Link ID| |Red Hat Issue Tracker | |SSSD-3219
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
Alexey Tikhonov atikhono@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|36 |37 Link ID| |Github | |SSSD/sssd/issues/5518
https://bugzilla.redhat.com/show_bug.cgi?id=1857104
Pavel Březina pbrezina@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution|--- |UPSTREAM Last Closed| |2023-09-14 12:39:25
--- Comment #15 from Pavel Březina pbrezina@redhat.com --- This has been sitting here for years, openssh upstream is not going to implement the switch. We however still plan to switch to KnownHostsCommand, but it has lower priority. I'm closing this BZ as UPSTREAM.
sssd-maintainers@lists.fedoraproject.org