All of lore.kernel.org
 help / color / mirror / Atom feed
From: gorcunov@gmail.com (Cyrill Gorcunov)
To: linux-security-module@vger.kernel.org
Subject: Leaking path for set_task_comm
Date: Tue, 25 Sep 2018 21:39:53 +0300	[thread overview]
Message-ID: <20180925183953.GI15710@uranus> (raw)
In-Reply-To: <F7DFF547-5267-4EF3-8BF3-70DAF6C2A53A@vt.edu>

On Tue, Sep 25, 2018 at 01:27:08PM -0400, Tong Zhang wrote:
> Kernel Version: 4.18.5
> 
> Problem Description:
> 
> When using prctl(PR_SET_NAME) to set the thread name, it is checked by security_task_prctl.
> 
> We discovered a leaking path that can also use method implemented in 
> fs/proc/base.c:1526 comm_write(), to do similar thing without asking LSM?s decision.

I don't understand how it is a problem. Could you please explain?
procfs/comm is created with S_IRUGO|S_IWUSR permissions. So
prctl and procfs are simply different interfaces.

WARNING: multiple messages have this Message-ID (diff)
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Tong Zhang <ztong@vt.edu>
Cc: adobriyan@gmail.com, akpm@linux-foundation.org,
	viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org,
	linux-security-module@vger.kernel.org, wenbo.s@samsung.com
Subject: Re: Leaking path for set_task_comm
Date: Tue, 25 Sep 2018 21:39:53 +0300	[thread overview]
Message-ID: <20180925183953.GI15710@uranus> (raw)
In-Reply-To: <F7DFF547-5267-4EF3-8BF3-70DAF6C2A53A@vt.edu>

On Tue, Sep 25, 2018 at 01:27:08PM -0400, Tong Zhang wrote:
> Kernel Version: 4.18.5
> 
> Problem Description:
> 
> When using prctl(PR_SET_NAME) to set the thread name, it is checked by security_task_prctl.
> 
> We discovered a leaking path that can also use method implemented in 
> fs/proc/base.c:1526 comm_write(), to do similar thing without asking LSM’s decision.

I don't understand how it is a problem. Could you please explain?
procfs/comm is created with S_IRUGO|S_IWUSR permissions. So
prctl and procfs are simply different interfaces.

  reply	other threads:[~2018-09-25 18:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25 17:27 Leaking path for set_task_comm Tong Zhang
2018-09-25 17:27 ` Tong Zhang
2018-09-25 18:39 ` Cyrill Gorcunov [this message]
2018-09-25 18:39   ` Cyrill Gorcunov
2018-09-26  0:44   ` TongZhang
2018-09-26  0:44     ` TongZhang
2018-09-26  3:16     ` Theodore Y. Ts'o
2018-09-26  3:16       ` Theodore Y. Ts'o
2018-09-26 22:39       ` Alan Cox
2018-09-26 22:39         ` Alan Cox

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=20180925183953.GI15710@uranus \
    --to=gorcunov@gmail.com \
    --cc=linux-security-module@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.