enable CONFIG_DEVTMPFS_SAFE

Bug #1974442 reported by Andrea Righi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

Use nosuid,noexec mount options on devtmpfs, this allows to provide a bit of extra security by preventing mmapping stuff in /dev with PROT_EXEC or having setuid executables.

[Test case]

If we really want to provide a test case for this...:

 $ grep devtmpfs /proc/mounts

We should see nosuid,noexec in the mount options if this change is applied, otherwise we should only see nosuid (or none of the above).

[Fix]

Enable CONFIG_DEVTMPFS_SAFE.

[Regression potential]

This change can potentially break some drivers that require mmapping /dev/mem with the PROT_EXEC flag (for example non-KSM video drivers, or drivers that need to execute BIOS / firmware code directly from /dev/mem).

However, it'd be nice to see if we still have drivers that are still relying on this dangerous behavior and provide some additional safety measures in the system.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1974442

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu Kinetic) because there has been no activity for 60 days.]

Changed in linux (Ubuntu Kinetic):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.19.0-15.15

---------------
linux (5.19.0-15.15) kinetic; urgency=medium

  * kinetic/linux: 5.19.0-15.15 -proposed tracker (LP: #1983335)

  * Miscellaneous Ubuntu changes
    - [Config] update annotations to support both gcc-11 and gcc-12

 -- Andrea Righi <email address hidden> Tue, 02 Aug 2022 09:23:01 +0200

Changed in linux (Ubuntu Kinetic):
status: Expired → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.