ANDROID: zram: ioctl: remove PTRACE permission check
The zram ioctl for process writeback included a PTRACE_MODE_READ_FSCREDS
permission check, originally added to prevent leaking ASLR metadata,
mirroring the design of process_madvise().
However, the current implementation uses a pidfd of the target process
to iterate over its VMAs entirely within kernel space. This design
prevents userspace from accessing any information that could leak ASLR
details. Therefore, the PTRACE permission check is no longer necessary.
This patch removes the check by replacing mm_access() with
get_task_mm(). The ioctl interface remains protected by the CAP_SYS_NICE
capability.
Bug: 446573436
Change-Id: Id7d3d5c63b382fb5e5f8f90b23f9ba01651b27b4
Signed-off-by:
Richard Chang <richardycc@google.com>
Loading