scponlyc has SUID not set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
scponly (Debian) |
Fix Released
|
Unknown
|
|||
scponly (Ubuntu) |
Invalid
|
Low
|
Unassigned |
Bug Description
The binary file (scponlyc) used for chrooted environments does not have the SUID bit enabled. This way nobody is able to login as the chroot cannot be performed with user privileges.
Installed package:
ii scponly 4.6-1 Restricts the commands available to scp- and sftp-users
Created a chrooted user with:
/usr/share/
---------- Messages in auth.log ----------------
Jun 27 09:21:03 vde sshd[16532]: Accepted password for USERXXX from XXX.XXX.XXX.XXX port 2475 ssh2 Jun 27 09:21:03 vde sshd[16534]: (pam_unix) session opened for user USERXXX by (uid=0) Jun 27 09:21:03 vde sshd[16534]: subsystem request for sftp Jun 27 09:21:03 vde scponly[16535]: chrooted binary in place, will chroot() Jun 27 09:21:03 vde scponly[16535]: 3 arguments in total. Jun 27 09:21:03 vde scponly[16535]: ^Iarg 0 is scponlyc Jun 27 09:21:03 vde scponly[16535]: ^Iarg 1 is -c Jun 27 09:21:03 vde scponly[16535]: ^Iarg 2 is /usr/lib/
-------
Solution
chmod u+s /usr/sbin/scponlyc
Changed in scponly: | |
status: | Unknown → Unconfirmed |
Changed in scponly: | |
importance: | Undecided → Low |
status: | Unconfirmed → Confirmed |
Changed in scponly (Debian): | |
status: | New → Fix Released |
There is already an debconf question for file permissions that should be set on scponlyc. The problem is that it is not shown on installation (using defaults on (k)ubuntu). A dpkg-reconfigure scponly brings it up and solves the problem.
Please consider raising the importance of the corresponding debconf question (so that it is shown upon installation) as half of the package is unuseable without it.