Re: authorized_keys in /tmp/.ssh?



Clem Taylor wrote:
I'm working on an embedded Linux system that has a read-only jffs2
root file system. /tmp is a tmpfs file system for files that need to
be writable. Anything that needs writable files is symlinked to /tmp.
[...]
It seems that sshd is finding the absolute path of the authorized_keys
file and then stating the first path entry. I'm not quite sure why it
is checking the top level directory and not the permissions of the
directory that contains the authorized_keys.

The check stops at the user's home directory if the real pathname is within that directory, otherwise it checks every parent directory to the root.

Generally, if a directory is group or world writable then the authorized_keys files and/or the .ssh directory could be renamed and recreated by a third party (the check does not consider the sticky bit, as it's rarely set on home directories).

I'd rather avoid having to separate tmpfs filesystems, so is there an
easy way to work around this problem? I'm using OpenSSH_3.9p1 and
OpenSSL 0.9.7e.

set "StrictModes no" in sshd_config? You could also teach the checks (secure_filename in auth.c) about sticky bits on directories.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.



Relevant Pages

  • 2.6.27-rc7 no init found on the root partition?
    ... but the kernel is unable to boot. ... XFS file system but no init found. ... it complains that root file system not found and I have ... # Input Device Drivers ...
    (Linux-Kernel)
  • Re: Getting signal 15 after boot
    ... before the point where the root file system ... This file also receives a copy of the kernel ringbuffer ... If your computer hangs even before this shell, ...
    (comp.os.linux.setup)
  • Re: [SLE] system hangups
    ... Single user mode only has your root file system mounted, ... I've seen the mount ...
    (SuSE)
  • Re: Init.c, making it chroot
    ... simply let init mount it in all cases, ... The kernel needs to mount devfs because that's how it finds the device node to mount the root file system from. ...
    (freebsd-hackers)
  • How can I determine version of apache running?? (pz4wfq .)
    ... NFS problem ... Determining who consumes disk space ... In a fact I am writing this question here because everything is working fine with file system shared on Sun/Solaris box, while it is not working with file system shared on EMC/Celerra. ... I am using disk less clients that boots RedHat 8.0 over BOOTP and mount root file system over nfs. ...
    (SunManagers)

Quantcast