Whole document tree 4. Security issues of Linux-PAMPAM, from the perspective of an application, is a convenient API for authenticating users. PAM modules generally have no increased privilege over that posessed by the application that is making use of it. For this reason, the application must take ultimate responsibility for protecting the environment in which PAM operates. A poorly (or maliciously) written application can defeat any Linux-PAM module's authentication mechanisms by simply ignoring it's return values. It is the applications task and responsibility to grant privileges and access to services. The Linux-PAM library simply assumes the responsibility of authenticating the user; ascertaining that the user is who they say they are. Care should be taken to anticipate all of the documented behavior of the Linux-PAM library functions. A failure to do this will most certainly lead to a future security breach. 4.1 Care about standard library callsIn general, writers of authorization-granting applications should
assume that each module is likely to call any or all `libc'
functions. For `libc' functions that return pointers to
static/dynamically allocated structures (ie. the library allocates the
memory and the user is not expected to ` Two important function classes that fall into this category are
4.2 Choice of a service nameWhen picking the service-name that corresponds to the first entry
in the Linux-PAM configuration file, the application programmer
should avoid the temptation of choosing something related to
To invoke some
and then run ./preferred_name
By studying the Linux-PAM configuration file(s), an attacker can
choose the The conclusion is that the application developer should carefully define the service-name of an application. The safest thing is to make it a single hard-wired name. 4.3 The conversation functionCare should be taken to ensure that the 4.4 The identity of the userThe Linux-PAM modules will need to determine the identity of the user who requests a service, and the identity of the user who grants the service. These two users will seldom be the same. Indeed there is generally a third user identity to be considered, the new (assumed) identity of the user once the service is granted. The need for keeping tabs on these identities is clearly an issue of
security. One convention that is actively used by some modules is
that the identity of the user requesting a service should be the
current For network-serving databases and other applications that provide their own security model (independent of the OS kernel) the above scheme is insufficient to identify the requesting user. A more portable solution to storing the identity of the requesting
user is to use the In addition to the 4.5 Sufficient resourcesCare should be taken to ensure that the proper execution of an
application is not compromised by a lack of system resources. If an
application is unable to open sufficient files to perform its service,
it should fail gracefully, or request additional resources.
Specifically, the quantities manipulated by the This is also true of conversation prompts. The application should not accept prompts of arbitrary length with out checking for resource allocation failure and dealing with such extreme conditions gracefully and in a mannor that preserves the PAM API. Such tolerance may be especially important when attempting to track a malicious adversary. Next Previous Contents |