lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 8 Jan 2021 17:02:30 -0800 (PST) From: David Rientjes <rientjes@...gle.com> To: Suren Baghdasaryan <surenb@...gle.com> cc: Minchan Kim <minchan@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, Jann Horn <jannh@...gle.com>, Kees Cook <keescook@...omium.org>, Jeffrey Vander Stoep <jeffv@...gle.com>, Michal Hocko <mhocko@...e.com>, Shakeel Butt <shakeelb@...gle.com>, Edgar Arriaga GarcĂa <edgararriaga@...gle.com>, Tim Murray <timmurray@...gle.com>, linux-mm <linux-mm@...ck.org>, selinux@...r.kernel.org, Linux API <linux-api@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>, kernel-team <kernel-team@...roid.com> Subject: Re: [PATCH 1/1] mm/madvise: replace ptrace attach requirement for process_madvise On Fri, 8 Jan 2021, Suren Baghdasaryan wrote: > > > @@ -1197,12 +1197,22 @@ SYSCALL_DEFINE5(process_madvise, int, pidfd, const struct iovec __user *, vec, > > > goto release_task; > > > } > > > > > > - mm = mm_access(task, PTRACE_MODE_ATTACH_FSCREDS); > > > + /* Require PTRACE_MODE_READ to avoid leaking ASLR metadata. */ > > > + mm = mm_access(task, PTRACE_MODE_READ_FSCREDS); > > > if (IS_ERR_OR_NULL(mm)) { > > > ret = IS_ERR(mm) ? PTR_ERR(mm) : -ESRCH; > > > goto release_task; > > > } > > > > > > + /* > > > + * Require CAP_SYS_NICE for influencing process performance. Note that > > > + * only non-destructive hints are currently supported. > > > + */ > > > + if (!capable(CAP_SYS_NICE)) { > > > + ret = -EPERM; > > > + goto release_task; > > > > mmput? > > Ouch! Thanks for pointing it out! Will include in the next respin. > With the fix, feel free to add: Acked-by: David Rientjes <rientjes@...gle.com> Thanks Suren!
Powered by blists - more mailing lists