android_kernel_motorola_sm6375/fs/proc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kalesh Singh d4d6a087de FROMGIT: procfs: prevent unpriveleged processes accessing fdinfo dir
The file permissions on the fdinfo dir from were changed from
S_IRUSR|S_IXUSR to S_IRUGO|S_IXUGO, and a PTRACE_MODE_READ check was added
for opening the fdinfo files [1].  However, the ptrace permission check
was not added to the directory, allowing anyone to get the open FD numbers
by reading the fdinfo directory.

Add the missing ptrace permission check for opening the fdinfo directory.

[1] https://lkml.kernel.org/r/20210308170651.919148-1-kaleshsingh@google.com

Link: https://lkml.kernel.org/r/20210713162008.1056986-1-kaleshsingh@google.com
Fixes: 7bc3fa0172a4 ("procfs: allow reading fdinfo with PTRACE_MODE_READ")
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Hridya Valsaraju <hridya@google.com>
Cc: Jann Horn <jannh@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 151772539
Change-Id: I274b30aa0a5ce8412eae7161d31c6ee955035da9
(cherry picked from commit fc73829fa54b0c7af32d6da7c972eb3390957da4
 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master)
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2026-05-07 10:19:32 -04:00
..
array.c UPSTREAM: seccomp: Fix CONFIG tests for Seccomp_filters 2026-05-07 10:17:18 -04:00
base.c UPSTREAM: procfs: allow reading fdinfo with PTRACE_MODE_READ 2026-05-07 10:19:07 -04:00
cmdline.c
consoles.c
cpuinfo.c
devices.c
fd.c FROMGIT: procfs: prevent unpriveleged processes accessing fdinfo dir 2026-05-07 10:19:32 -04:00
fd.h
generic.c fs/proc: fix uaf in proc_readdir_de() 2025-12-03 12:45:21 +01:00
inode.c fix proc_sys_compare() handling of in-lookup dentries 2025-07-17 18:25:01 +02:00
internal.h
interrupts.c
Kconfig
kcore.c BACKPORT: maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault 2026-01-14 18:13:21 -08:00
kmsg.c
loadavg.c
Makefile
meminfo.c
namespaces.c UPSTREAM: nsfs: clean-up ns_get_path() signature to return int 2025-12-23 13:35:44 -08:00
nommu.c
page.c
proc_net.c UPSTREAM: bpf: Refactor to provide aux info to bpf_iter_init_seq_priv_t 2026-01-14 18:12:07 -08:00
proc_sysctl.c proc: use kvzalloc for our kernel buffer 2026-02-01 20:39:16 -08:00
proc_tty.c
root.c
self.c
softirqs.c proc/softirqs: replace seq_printf with seq_put_decimal_ull_width 2024-12-14 19:44:21 +01:00
stat.c
task_mmu.c Merge tag 'ASB-2025-09-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2025-09-12 18:48:05 +03:00
task_nommu.c
thread_self.c
uptime.c
util.c
version.c
vmcore.c fs/proc: fix softlockup in __read_vmcore (part 2) 2025-02-01 18:18:51 +01:00