deadsimple BSD Security Advisories and Announcements

FreeBSD Security Advisory FreeBSD-SA-21:03.pam_login_access

Hash: SHA512

FreeBSD-SA-21:03.pam_login_access                           Security Advisory
                                                          The FreeBSD Project

Topic:          login.access fails to apply rules

Category:       core
Module:         pam_login_access
Announced:      2021-02-24
Affects:        All supported versions of FreeBSD.
Corrected:      2021-02-24 01:20:53 UTC (stable/13, 13.0-STABLE)
                2021-02-24 01:42:42 UTC (releng/13.0, 13.0-BETA3-p1)
                2021-02-24 01:40:36 UTC (stable/12, 12.2-STABLE)
                2021-02-24 01:44:01 UTC (releng/12.2, 12.2-RELEASE-p4)
                2021-02-24 01:39:53 UTC (stable/11, 11.4-STABLE)
                2021-02-24 01:41:53 UTC (releng/11.4, 11.4-RELEASE-p8)
CVE Name:       CVE-2020-25580

For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit <URL:>.

I.   Background

login.access(5) is a system configuration file allowing administrators to
define policy around system login access by specific users and groups.  It
is implemented by a pam(3) module, pam_login_access(8), and is configured
by default for accesses via sshd(8), telnetd(8) and the system console.

II.  Problem Description

A regression in the login.access(5) rule processor has the effect of causing
rules to fail to match even when they should not.  This means that rules
denying access may be ignored.

III. Impact

The configuration in login.access(5) may not be applied, permitting login
access to users even when the system is configured to deny it.

IV.  Workaround

No workaround is available.  Systems not relying on login.access(5) to
enforce custom login policies are not affected.

V.   Solution

Upgrade your vulnerable system to a supported FreeBSD stable or
release / security branch (releng) dated after the correction date.

Perform one of the following:

1) To update your vulnerable system via a binary patch:

Systems running a RELEASE version of FreeBSD on the i386 or amd64
platforms can be updated via the freebsd-update(8) utility:

# freebsd-update fetch
# freebsd-update install

2) To update your vulnerable system via a source code patch:

The following patches have been verified to apply to the applicable
FreeBSD release branches.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch
# fetch
# gpg --verify pam_login_access.patch.asc

b) Apply the patch.  Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch

c) Recompile the operating system using buildworld and installworld as
described in <URL:>.

Restart all daemons that use the library, or reboot the system.

VI.  Correction details

The following list contains the correction revision numbers for each
affected branch.

Branch/path                                                      Revision
- -------------------------------------------------------------------------
stable/13/                       8cf559d6b9b4782bf67eb868ea480f47fc8c64a4
releng/13.0/                     f82cffcf2f44c909bec00d18549826f5d1d62205
stable/12/                                                        r369346
releng/12.2/                                                      r369359
stable/11/                                                        r369345
releng/11.4/                                                      r369351
- -------------------------------------------------------------------------

[FreeBSD 13.x]
To see which files were modified by a particular revision, run the following
command in a checked out git repository, replacing NNNNNN with the revision

# git show --stat NNNNNN

Or visit the following URL, replace NNNNNN with the revision hash:


[FreeBSD 11.x, FreeBSD 12.x]
To see which files were modified by a particular revision, run the
following command, replacing NNNNNN with the revision number, on a
machine with Subversion installed:

# svn diff -cNNNNNN --summarize svn://

Or visit the following URL, replacing NNNNNN with the revision number:


VII. References


The latest revision of this advisory is available at

_______________________________________________ mailing list
To unsubscribe, send any mail to ""