This will fail when mac_veriexec is enforced.
Move the check from procfs_doprocmem to proc_rwmem to ensure all
cases are covered.
Sponsored by: Juniper Networks, Inc.
Differential D47484
proc_rwmem check PRIV_PROC_MEM_WRITE when writing sjg on Fri, Nov 8, 5:09 AM. Authored by
Details
Diff Detail
Event TimelineComment Actions proc_rwmem() is also called by ptrace() and cuse(4). I can imagine you also want to prevent process tampering via ptrace(), but what about cuse(4), and more generally other potential uses where data transfers are performed by proc_rwmem()? If this is a concern, an alternative would be to add a check of PRIV_PROC_MEM_WRITE directly in kern_ptrace().
|