Bug 1893 - change ssh-keysign to setgid from setuid
Summary: change ssh-keysign to setgid from setuid
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Miscellaneous (show other bugs)
Version: 5.8p1
Hardware: All All
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-22 07:16 AEST by jchadima
Modified: 2012-05-29 05:18 AEST (History)
5 users (show)

See Also:


Attachments
patch solving the problem (1.66 KB, patch)
2011-04-22 07:17 AEST, jchadima
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jchadima 2011-04-22 07:16:05 AEST
the setgid programs are potentially less dangerous than setuid ones.

the only setuid program in the openssh suite is ssh-keysign. It need to access private server keys.

The solution is to create one dedicated group (ssh_keys).
The keys then should be rw-r---- root:ssh_keys
The ssh-keysign should be setgid ssh_keys
And finally authfile.c should be patched to accept such keys.
Comment 1 jchadima 2011-04-22 07:17:21 AEST
Created attachment 2035 [details]
patch solving the problem
Comment 2 Jim Knoble 2011-04-22 08:20:51 AEST
So how is this supposed to work in practice?  Change everyone's home directory to be mode 0710 group ssh_keys?

Why is the "ssh_keys" group hard-coded in authfile.c?
Comment 3 jchadima 2011-04-22 14:49:49 AEST
No, home directories no not need change.
Only change is on the server private keys.

The hard-coded server keys are for the security reasons.
Comment 4 Damien Miller 2011-06-03 10:41:24 AEST
I don't think there is much point to getting rid of the setuid bit on ssh-keysign. There are only 12 lines of code executed before dropping privileges and these are clearly quite safe.
Comment 5 Damien Miller 2011-09-06 15:33:02 AEST
close resolved bugs now that openssh-5.9 has been released
Comment 6 Edward Z. Yang 2012-05-29 05:18:25 AEST
I am confused why this bug is closed WONTFIX, as the ssh_keys group appears to have made its way into recent Fedora.