Created attachment 1800 [details] call ssh_selinux_setup_exec_context before chrooting This patch is from Russell Coker <russell@coker.com.au>; I know little about SE Linux myself and defer to him for domain knowledge. He says: "The following patch allows the chroot functionality for sftp (and probably regular logins) work with SE Linux. After chroot() is called the SE Linux context setting won't work unless /selinux and /proc are mounted in the chroot environment. Even worse, if the user has control over the chroot environment then they may be able to control the context that they get (I haven't verified this)."
Patch applied and will be in OpenSSH-5.5. FYI there is no risk of privilege escalation because we ensure that the ChrootDirectory is root-owned and not writable by the user.
Mass move of bugs RESOLVED->CLOSED following the release of openssh-5.5p1