David Edelsohn
2001-Nov-16 22:11 UTC
auth.c:secure_filename() ownership test continues past home directory
My colleagues and I believe we have found a problem in the auth.c:secure_filename() code which causes it to be more aggressive than intended. We first noticed the problem in OpenSSH-2.9.9. secure_filename() comments that the loop walking up the directory components stops if it is past the home directory. However, the filename argument to the function is canonicalized with realpath() while the home directory provided by the password entry never is canonicalized. If the password entry home directory is not the canonial path (automounted, for example), then the component walk does not terminate until it has reached the root directory, which is past the home directory. If any component is not owned by root, then the security check fails and public key authentication is not allowed. This appears to be a stricter ownership requirement than what was intended in the code. Would you please consider canonicalizing the password entry home directory within the function using realpath() for accurate comparison to the filename argument? Thanks, David ==============================================================================David Edelsohn T.J. Watson Research Center dje at watson.ibm.com P.O. Box 218 +1 914 945 4364 (TL 862) Yorktown Heights, NY 10598
Markus Friedl
2001-Nov-17 13:12 UTC
auth.c:secure_filename() ownership test continues past home directory
On Fri, Nov 16, 2001 at 05:11:11PM -0500, David Edelsohn wrote:> My colleagues and I believe we have found a problem in the > auth.c:secure_filename() code which causes it to be more aggressive than > intended. We first noticed the problem in OpenSSH-2.9.9.thanks, this has been fixed in newer releases. -m
Possibly Parallel Threads
- OpenSSH 3.6.1p2 ON SCO 3.2v4.2 + STRICTMODES -->yes
- Solaris 2.5.1 dirname() bug in libgen.a affects OpenSSH2.9.9p2 auth.c
- Is there a way to tell the sshd to ignore the security check on t he user's home permissions?
- ssh output
- Fw: domU network problem , 10/30 progress