From Fedora Project Wiki
No edit summary
(Add trackers)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Remove pam_console =
= Remove pam_console =
{{Change_Proposal_Banner}}


== Summary ==
== Summary ==
Remove pam_console as it does nothing.
Remove pam_console as it is not enabled by default, can be replaced by systemd and has security issues.


== Owner ==
== Owner ==
Line 15: Line 13:


== Current status ==
== Current status ==
[[Category:ChangePageIncomplete]]
[[Category:ChangeAcceptedF39]]
<!-- TODO: -->
<!-- TODO: -->
<!-- When your change proposal page is completed and ready for review and announcement -->
<!-- When your change proposal page is completed and ready for review and announcement -->
Line 33: Line 31:
ON_QA -> change is fully code complete
ON_QA -> change is fully code complete
-->
-->
* FESCo issue: <will be assigned by the Wrangler>
* [https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/3MV5G32UF2TQ3U7JZXPRLQWCQUPR7QT2/ devel thread]
* Tracker bug: <will be assigned by the Wrangler>
* FESCo issue: [https://pagure.io/fesco/issue/2945 #2945]
* Release notes tracker: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=2166692 #2166692]
* Release notes tracker: [https://pagure.io/fedora-docs/release-notes/issue/965 #965]


== Detailed Description ==
== Detailed Description ==
pam_console give users at the physical console additional capabilities when authenticating, and removes those capabilities when the user logs out. The module changes the permissions and ownership of files and devices.
pam_console give users at the physical console additional capabilities when authenticating, and removes those capabilities when the user logs out. The module changes the permissions and ownership of files and devices.


pam_console has some limitations and flaws, including several security concerns. If the user isn't logged out successfully, the permissions wouldn't be retired. Moreover, there are some scenarios in which an inactive session could spy on active sessions. Besides, only one user can have those additional capabilities at the same time. Finally, as of today the module does nothing because one of the configuration files use to define the permissions (50-default.perms) is not installed in the distribution. Other packages may install their own configuration files to specify the permissions, but I haven't found any.
pam_console has some limitations and flaws:
* Only one user can have those additional capabilities at the same time (no multi-seat)
* Potential security problems of device file ownership if the PAM conversation ending isn't executed
* Remove ACL and call revoke() on device nodes for fast-user-switching. This is to prevent the user of the inactive session B spying on the user of the active session A using webcam, sound cards, etc.
* As of today the module does nothing because one of the configuration files use to define the permissions (50-default.perms) is not installed in the distribution. Other packages may install their own configuration files to specify the permissions, but I haven't found any.


These additional capabilities that pam_console provides are useful to simplify the work for console users. Usually, the permissions are set for devices like the CD/DVD reader, or the disk drives. This functionality is still useful today, and it should be managed with systemd-logind, rather than with a PAM module. This systemd service takes care of user sessions, multi-seat management, device access management... This would increase the security level of the system, and enable multi-seat for the file and device permissions. For more information on how to please refer to the systemd documentation on how to [https://www.freedesktop.org/wiki/Software/systemd/writing-display-managers/ Write Display Managers] and [https://www.freedesktop.org/wiki/Software/systemd/writing-desktop-environments/ Write Desktop Environments].
These additional capabilities that pam_console provides are useful to simplify the work for console users. Usually, the permissions are set for devices like the CD/DVD reader, or the disk drives. This functionality is still useful today, and it should be managed with systemd-logind, rather than with a PAM module. This systemd service takes care of user sessions, multi-seat management, device access management... This would increase the security level of the system, and enable multi-seat for the file and device permissions. For more information on systemd-logind implementation refer to the documentation on how to [https://www.freedesktop.org/wiki/Software/systemd/writing-display-managers/ Write Display Managers] and [https://www.freedesktop.org/wiki/Software/systemd/writing-desktop-environments/ Write Desktop Environments].


In 2007 there was a [[Releases/FeatureRemovePAMConsole|System-Wide Change]] proposal to remove pam_console, but it wasn't finished. My plan is to continue that work and remove the pam_console module.
In 2007 there was a [[Releases/FeatureRemovePAMConsole|System-Wide Change]] proposal to remove pam_console, but it wasn't finished. My plan is to continue that work and remove the pam_console module.
Line 61: Line 64:
# Identified software package maintainers should review and merge the pam_console removal PRs.
# Identified software package maintainers should review and merge the pam_console removal PRs.


* Release engineering: [https://pagure.io/releng/issues #Releng issue number] <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Release engineering: [https://pagure.io/releng/issue/11223 #11223]
<!-- Does this feature require coordination with release engineering (e.g. changes to installer image generation or update package delivery)?  Is a mass rebuild required?  include a link to the releng issue.
The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication -->
<!-- TODO: add link -->


* Policies and guidelines: N/A
* Policies and guidelines: N/A

Latest revision as of 16:36, 2 February 2023

Remove pam_console

Summary

Remove pam_console as it is not enabled by default, can be replaced by systemd and has security issues.

Owner


Current status

Detailed Description

pam_console give users at the physical console additional capabilities when authenticating, and removes those capabilities when the user logs out. The module changes the permissions and ownership of files and devices.

pam_console has some limitations and flaws:

  • Only one user can have those additional capabilities at the same time (no multi-seat)
  • Potential security problems of device file ownership if the PAM conversation ending isn't executed
  • Remove ACL and call revoke() on device nodes for fast-user-switching. This is to prevent the user of the inactive session B spying on the user of the active session A using webcam, sound cards, etc.
  • As of today the module does nothing because one of the configuration files use to define the permissions (50-default.perms) is not installed in the distribution. Other packages may install their own configuration files to specify the permissions, but I haven't found any.

These additional capabilities that pam_console provides are useful to simplify the work for console users. Usually, the permissions are set for devices like the CD/DVD reader, or the disk drives. This functionality is still useful today, and it should be managed with systemd-logind, rather than with a PAM module. This systemd service takes care of user sessions, multi-seat management, device access management... This would increase the security level of the system, and enable multi-seat for the file and device permissions. For more information on systemd-logind implementation refer to the documentation on how to Write Display Managers and Write Desktop Environments.

In 2007 there was a System-Wide Change proposal to remove pam_console, but it wasn't finished. My plan is to continue that work and remove the pam_console module.


Feedback

Benefit to Fedora

By removing pam_console and moving to systemd-logind the distribution would benefit from the multi-seat functionality and higher security levels.

Scope

  • Proposal owners:
  1. Provide PRs to remove pam_console from the PAM stack of the identified software packages (see Dependencies).
  2. Remove pam_console from pam-redhat project and rebuild the PAM package without it.
  • Other developers:
  1. Identified software package maintainers should review and merge the pam_console removal PRs.
  • Policies and guidelines: N/A
  • Trademark approval: N/A
  • Alignment with Objectives: N/A

Upgrade/compatibility impact

No impact is expected.


How To Test

No special hardware or configuration is required to test this change. Once the change is in place, check that the pam_console isn't installed in your system (default location: /lib64/security/pam_console.so) and do a user authentication (i.e. graphical interface, su, ssh, and whatever else comes to your mind).


User Experience

Users won't experience any change.

Dependencies

This change depends on other packages removing pam_console from their PAM stack. I have identified five packages and I have opened a bugzilla for all of them:

From the above list only the first item is a blocker as it requires pam_console to succeed in the authentication. In all other cases it is optional, so not removing the module from their PAM stack will only cause a message printed in the security file.


Contingency Plan

  • Contingency mechanism: Postpone to the next release.
  • Contingency deadline: Beta freeze.
  • Blocks release? No.


Documentation

No documentation.


Release Notes

No need to update the release notes for this change.