Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 115553
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Yev <yevk@walla.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
openssh-4.2p1-gsskex-20050926-2-fixed.patch This is the FIXED version of the patch mentioned in the bug report. patch Yev 2005-12-14 10:13 0000 55.92 KB Details | Diff
openssh-4.7p1-gsskex-20070927.patch.txt Latest patch against openssh-4.7p1 patch Kamil Kisiel 2008-03-03 04:22 0000 65.13 KB Details | Diff
openssh-4.7_p1-r5.ebuild.patch Patch against openssh-4.7_p1-r4 ebuild patch Kamil Kisiel 2008-03-03 04:26 0000 521 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 115553 depends on: Show dependency tree
Bug 115553 blocks:
Votes: 1    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-12-14 10:05 0000
The ebuild of OpenSSH-4.2_p1 in the portage tree does'nt support 
GSSAPI/Kerberos key exchange properly. I've found a patch on this site: 
http://www.sxw.org.uk/computing/patches/openssh.html which fixes the problem.
Since it's not included in the ebuild i had to create an overlay ebuild to 
compile it in. After fixing some minor problems with the patch(there are line 
breaks which cause the compilation to fail due to syntax errors) i've 
successfuly compiled the overlay ebuild.

I'm posting this bug report to ask that the specified patch be included in the 
ebuild of OpenSSH in the portage tree.

Reproducible: Always
Steps to Reproduce:
1. emerge OpenSSH-4.2_p1 with USE flags: kerberos -pam
2. Setup GSSAPI/Kerberos authentication
3. On client, use kinit -f to get a forwardable ticket
4. Try to connect to server.

Actual Results:  
I've been asked for password.

Expected Results:  
The ticket should have been forwarded to sshd which then should have log me in 
without asking for password.

After compiling the ebuild with the patch and USE="kerberos", at least the 
following settings should be used in /etc/ssh/sshd_config to enable 
GSSAPI/Kerberos Key Exchange in sshd:
# Kerberos
KerberosAuthentication yes

# GSSAPI
GSSAPIAuthentication yes
GSSAPIKeyExchange yes

------- Comment #1 From Yev 2005-12-14 10:13:10 0000 -------
Created an attachment (id=74741) [details]
This is the FIXED version of the patch mentioned in the bug report.

This is the FIXED(with the problematic line breaks removed) version of the
patch file from the site:http://www.sxw.org.uk/computing/patches/openssh.html
site.

All that's left to do is to add this patch to the "files" folder of the ebuild
and add the line "use kerberos && <patch name>" to the OpenSSH .ebuild file in
the src_unpack() function.

------- Comment #2 From Yev 2006-03-02 07:42:44 0000 -------
Is there any progress regarding this bug report?

------- Comment #3 From Andrea Barisani (RETIRED) 2006-03-20 03:14:35 0000 -------
I ahve 0 experience with the GSSAPI/kerberos framework and I don't like
overpatching openssh, is there a reason why this is not included upstream?

CCing vapier since he might have more insight in this.

(sorry for the delay)

------- Comment #4 From Bryan Jacobs 2006-04-07 18:13:54 0000 -------
This patch appears to fail with USE="X509" (I was also using "smartcard", so
that could have been the source of my woes - could someone confirm?), but
otherwise functions as stated when applied after all current Gentoo patches.

Could we please get this out into the wild?  Debian's ssh-krb5 black magic has
been a forbidden fruit for us Kerberos nuts...

The reason why this isn't included upstream is because the OpenSSH folks seem
to have some kind of religious objection to adding application-specific code
into the body of OpenSSH.  I can't say I blame them.  It SHOULD be possible to
do all of this in PAM (I've gotten key delegation to work with a [relatively]
unpatched OpenSSH using PPK authentication - trying setting
"GSSAPIDelegateCredentials on" for the host entries you want in
/etc/ssh/ssh_config), but managing the KRB5CCNAME and other variables across
multiple PAGs on different machines is extremely tricky...

On a side note, "KerberosAuthentication yes" shouldn't be necessary.  IIRC,
that's for server-side Kerberos validation of passwords sent across the wire. 
If you already have credentials, it is ignored... Unless the reason for putting
it there was because of USE="-pam", which is also not necessary to get GSSAPI
credential delegation working.

It appears that a more recent version of this patch may be obtained from
http://www.sxw.org.uk/computing/patches/openssh.html .

A tip: make sure your .k5login files are correct!  This one cost me a lot of
time... Each file should contain a newline-separated list of principals (with
realms attached) that are authorized to log in as a given user.

------- Comment #5 From Martin Mokrejš 2006-05-04 06:08:11 0000 -------
Kerberos support in openssh was always "unsupported". As there was never a
dedicated developer of the kerberos code, some 2 two or three years ago the
kerberos code has been completely ripped out. Somewhere in the Changelog I
think was stated something like "unless fully tested and supported".

Simply, people make and release their own patches on the web. You should accept
it for us. Or make the epatch run only when kerberos flag is set. ;)



BTW, someone should pick up these patches:

   - djm@cvs.openbsd.org 2006/03/20 04:07:22
     [auth2-gss.c]
     GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
     reviewed by simon AT sxw.org.uk; deraadt@ ok
   - djm@cvs.openbsd.org 2006/03/20 04:07:49
     [gss-genr.c]
     more GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
     reviewed by simon AT sxw.org.uk; deraadt@ ok
   - djm@cvs.openbsd.org 2006/03/20 04:08:18
     [gss-serv.c]
     last lot of GSSAPI related leaks detected by Coverity via
     elad AT netbsd.org; reviewed by simon AT sxw.org.uk; deraadt@ ok



Regarding the proposed patch, the following snippet from the webpage is for me
personally the best marking:

"Acknowledgements

Fixes and suggestions have been provided by Jeffrey Altman, Jim Basney, Derrick
J Brashear, Chris Chiappa, Nalin Dahyabhai, Douglas E Engert, Bill Fithen, Sam
Hartman, John Hawkinson, Karsten Huneycutt, John Kilburg, Daniel Kouril, David
Leonard, Dan Russell, Vern Staats, Von Welch and Nicolas Williams."


See also bug #132243.

------- Comment #6 From Jakub Moc (RETIRED) 2006-05-31 00:30:35 0000 -------
*** Bug 134973 has been marked as a duplicate of this bug. ***

------- Comment #7 From Kamil Kisiel 2008-02-04 22:51:20 0000 -------
Can we please get this patch integrated in the ebuild? We are using this
feature extensively in our infrastructure. Currently I've rolled my own
addition to the Gentoo ebuild to support this feature. It would be good to have
it officially in the distribution, even if it had to be enabled with a use
flag.

Apple has included this patch in their shipping versions of OS X, so I believe
that even though it's not yet integrated in to OpenSSH proper it is fairly
stable.

You can get the current version of the patch (for 4.7p1) here:
http://www.sxw.org.uk/computing/patches/openssh.html

------- Comment #8 From Kamil Kisiel 2008-03-03 04:22:37 0000 -------
Created an attachment (id=145176) [details]
Latest patch against openssh-4.7p1

------- Comment #9 From Kamil Kisiel 2008-03-03 04:26:34 0000 -------
Created an attachment (id=145178) [details]
Patch against openssh-4.7_p1-r4 ebuild

Here's a patch to the ebuild which will add in the key exchange patch. The
previous GSSAPI patch appears to be unnecessary as it is incorporated in to
this one.

------- Comment #10 From SpanKY 2008-03-29 03:07:03 0000 -------
added to openssh-4.7_p1-r5

------- Comment #11 From Harald Barth 2009-07-01 09:11:13 0000 -------
We use GSSAPI KeyExchange in our sshd and it is annoying to have to tell gentoo
users who want to connect to our site that they have to downgrade before they
can do so. I know that there is no patch for 5.2 yet so I ported Simon's patch
to 5.2 and have it available here:
http://www.stacken.kth.se/~haba/openssh-5.2p1-gsskex-20090610.patch

Simon says there will be an official better patch later this week (2009-07-04
that would be). Please keep an eye on http://www.sxw.org.uk/computing/patches/
and if a new patch does not surface by the end of the week decide if you want
to nag Simon or verify my patch instead.

Thanks,
Harald.

------- Comment #12 From Harald Barth 2009-07-01 09:13:29 0000 -------
As support for KeyExchange is _not_ in 5.2, I'd like to reopen this bug instead
of creating a new one.

------- Comment #13 From SpanKY 2009-07-02 01:40:19 0000 -------
then again, relying on custom patchsets doesnt seem like a terribly grand idea
either ...

considering you're the one interested in the patch, why dont you keep tabs on
it and let us know when it gets updated

------- Comment #14 From Harald Barth 2009-07-28 15:51:58 0000 -------
Patch for 5.2p1 finaly available from the usual place:
http://www.sxw.org.uk/computing/patches/openssh.html

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug