Patch "debugfs: Make debugfs_allow RO after init" has been added to the 5.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    debugfs: Make debugfs_allow RO after init

to the 5.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     debugfs-make-debugfs_allow-ro-after-init.patch
and it can be found in the queue-5.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 312723a0b34d6d110aa4427a982536bb36ab8471 Mon Sep 17 00:00:00 2001
From: Kees Cook <keescook@xxxxxxxxxxxx>
Date: Mon, 5 Apr 2021 14:39:59 -0700
Subject: debugfs: Make debugfs_allow RO after init

From: Kees Cook <keescook@xxxxxxxxxxxx>

commit 312723a0b34d6d110aa4427a982536bb36ab8471 upstream.

Since debugfs_allow is only set at boot time during __init, make it
read-only after being set.

Fixes: a24c6f7bc923 ("debugfs: Add access restriction option")
Cc: Peter Enderborg <peter.enderborg@xxxxxxxx>
Reviewed-by: Peter Enderborg <peter.enderborg@xxxxxxxx>
Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20210405213959.3079432-1-keescook@xxxxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/debugfs/inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -35,7 +35,7 @@
 static struct vfsmount *debugfs_mount;
 static int debugfs_mount_count;
 static bool debugfs_registered;
-static unsigned int debugfs_allow = DEFAULT_DEBUGFS_ALLOW_BITS;
+static unsigned int debugfs_allow __ro_after_init = DEFAULT_DEBUGFS_ALLOW_BITS;
 
 /*
  * Don't allow access attributes to be changed whilst the kernel is locked down


Patches currently in stable-queue which might be from keescook@xxxxxxxxxxxx are

queue-5.11/sctp-fix-out-of-bounds-warning-in-sctp_process_ascon.patch
queue-5.11/wl3501_cs-fix-out-of-bounds-warnings-in-wl3501_send_.patch
queue-5.11/wl3501_cs-fix-out-of-bounds-warnings-in-wl3501_mgmt_.patch
queue-5.11/drm-radeon-fix-off-by-one-power_state-index-heap-ove.patch
queue-5.11/debugfs-make-debugfs_allow-ro-after-init.patch
queue-5.11/drm-radeon-avoid-power-table-parsing-memory-leaks.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux