[原文]libutil in OpenSSH on FreeBSD 4.4 and earlier does not drop privileges before verifying the capabilities for reading the copyright and welcome files, which allows local users to bypass the capabilities checks and read arbitrary files by specifying alternate copyright or welcome files.
FreeBSD is a freely available, open source implementation of the BSD UNIX Operating System. It is developed and maintained by the FreeBSD Project.
It is possible for a user with access to a system via SSH to gain access to privileged information. This problem is caused by a mixture of problems with login capabilities, the FreeBSD OpenSSH port not dropping privileges during part of the login process, and login not dropping privileges at the correct time. A user could make a malicious entry in the .login.conf file in their home directoy, and read files such as the master.passwd file and gain access to encrypted passwords on the system.
This issue does not appear to affect other BSD distributions.
In a .login.conf entry contained in a home directory, make the following entry if accessing the system via OpenSSH:
Otherwise, if accessing the system via login, make the following entry in a .login.conf:
OpenSSH on FreeBSD platforms contains a flaw that may lead to an unauthorized information disclosure. The issue is triggered when the user sets welcome or copyright file parameters to system-sensitive files in their login.conf, which will disclose the contents of those files to that user, resulting in a loss of confidentiality.
Upgrade to version 4.4-RELEASE or higher, as it has been reported to fix this vulnerability. It is also possible to correct the flaw by applying the vendor-supplied patch.