diff options
Diffstat (limited to 'fs/proc/kcore.c')
-rw-r--r-- | fs/proc/kcore.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index f5834488b67d..ee2c576cc94e 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/ioport.h> | 31 | #include <linux/ioport.h> |
32 | #include <linux/memory.h> | 32 | #include <linux/memory.h> |
33 | #include <linux/sched/task.h> | 33 | #include <linux/sched/task.h> |
34 | #include <linux/security.h> | ||
34 | #include <asm/sections.h> | 35 | #include <asm/sections.h> |
35 | #include "internal.h" | 36 | #include "internal.h" |
36 | 37 | ||
@@ -545,6 +546,10 @@ out: | |||
545 | 546 | ||
546 | static int open_kcore(struct inode *inode, struct file *filp) | 547 | static int open_kcore(struct inode *inode, struct file *filp) |
547 | { | 548 | { |
549 | int ret = security_locked_down(LOCKDOWN_KCORE); | ||
550 | |||
551 | if (ret) | ||
552 | return ret; | ||
548 | if (!capable(CAP_SYS_RAWIO)) | 553 | if (!capable(CAP_SYS_RAWIO)) |
549 | return -EPERM; | 554 | return -EPERM; |
550 | 555 | ||