aboutsummaryrefslogtreecommitdiffstats
path: root/lib/alloc_tag.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2024-04-25 20:08:50 +0000
committerAndrew Morton <[email protected]>2024-04-26 03:55:59 +0000
commite13106952faad91c6e492bf23b7cbdf1b1c269ce (patch)
tree8d16261343e213ee7e0a9c2acdc0d3978b31863d /lib/alloc_tag.c
parentmm: change inlined allocation helpers to account at the call site (diff)
downloadkernel-e13106952faad91c6e492bf23b7cbdf1b1c269ce.tar.gz
kernel-e13106952faad91c6e492bf23b7cbdf1b1c269ce.zip
alloc_tag: Tighten file permissions on /proc/allocinfo
The /proc/allocinfo file exposes a tremendous about of information about kernel build details, memory allocations (obviously), and potentially even image layout (due to ordering). As this is intended to be consumed by system owners (like /proc/slabinfo), use the same file permissions as there: 0400. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]> Cc: Kent Overstreet <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'lib/alloc_tag.c')
-rw-r--r--lib/alloc_tag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/alloc_tag.c b/lib/alloc_tag.c
index 26af9982ddc4..531dbe2f5456 100644
--- a/lib/alloc_tag.c
+++ b/lib/alloc_tag.c
@@ -129,7 +129,7 @@ size_t alloc_tag_top_users(struct codetag_bytes *tags, size_t count, bool can_sl
static void __init procfs_init(void)
{
- proc_create_seq("allocinfo", 0444, NULL, &allocinfo_seq_op);
+ proc_create_seq("allocinfo", 0400, NULL, &allocinfo_seq_op);
}
static bool alloc_tag_module_unload(struct codetag_type *cttype,