[Bug 1811] New: ssh_selinux_enabled() fails without mounted /proc

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Sat Aug 28 07:45:41 EST 2010


https://bugzilla.mindrot.org/show_bug.cgi?id=1811

           Summary: ssh_selinux_enabled() fails without mounted /proc
           Product: Portable OpenSSH
           Version: 5.5p1
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: sshd
        AssignedTo: unassigned-bugs at mindrot.org
        ReportedBy: openssh at bugs.werbittewas.de


is_selinux_enabled() may return -1, if it cannot open /proc/filesystems
as you can see in the code:
http://userspace.selinuxproject.org/trac/browser/libselinux/src/enabled.c

unfortunately the function ssh_selinux_enabled() does not check against
failure (maybe due bad documentation of is_selinux_enabled() ), but use
any non-0-value as enabled. further calls to any selinux-function will
fail and no login is possible!

so please change the line "enabled = is_selinux_enabled();" in
openbsd-compat/port-linux.c to something like "enabled = (1 ==
is_selinux_enabled());" or - if you think that a selinux-failure at
this point have to lead to denied login - add an option to config to
disable selinux-usage of sshd.

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list