LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Kacper Kornet <kornet@camk.edu.pl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, stable@kernel.org
Subject: [for .36,.37 stable] Re: [PATCH v2] Fix prlimit64 for suid/sgid processes
Date: Mon, 31 Jan 2011 10:40:57 +0100 [thread overview]
Message-ID: <4D4683A9.8050400@suse.cz> (raw)
In-Reply-To: <20110128232104.GA22667@camk.edu.pl>
Ccing stable.
Merged as aa5bd67dcfdf9 and should go into:
->.36-stable (if maintained still)
->.37-stable
On 01/29/2011 12:21 AM, Kacper Kornet wrote:
> Since check_prlimit_permission always fails in the case of SUID/GUID
> processes, such processes are not able to read or set their own limits.
> This commit changes this by assuming that process can always read/change
> its own limits.
>
> Signed-off-by: Kacper Kornet <kornet@camk.edu.pl>
> ---
> kernel/sys.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/sys.c b/kernel/sys.c
> index e9ad444..03bead7 100644
> --- a/kernel/sys.c
> +++ b/kernel/sys.c
> @@ -1375,7 +1375,8 @@ static int check_prlimit_permission(struct task_struct *task)
> const struct cred *cred = current_cred(), *tcred;
>
> tcred = __task_cred(task);
> - if ((cred->uid != tcred->euid ||
> + if (current != task &&
> + (cred->uid != tcred->euid ||
> cred->uid != tcred->suid ||
> cred->uid != tcred->uid ||
> cred->gid != tcred->egid ||
thanks,
--
js
suse labs
next prev parent reply other threads:[~2011-01-31 9:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 13:47 [PATCH] " Kacper Kornet
2011-01-27 22:59 ` Linus Torvalds
2011-01-28 23:21 ` [PATCH v2] " Kacper Kornet
2011-01-28 23:28 ` Jiri Slaby
2011-01-31 9:40 ` Jiri Slaby [this message]
2011-02-15 14:28 ` [stable] [for .36, .37 stable] " Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D4683A9.8050400@suse.cz \
--to=jslaby@suse.cz \
--cc=kornet@camk.edu.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--subject='[for .36,.37 stable] Re: [PATCH v2] Fix prlimit64 for suid/sgid processes' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).