All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Vasiliy Kulikov <segoon@openwall.com>
Cc: kernel-hardening@lists.openwall.com,
	Cyrill Gorcunov <gorcunov@gmail.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	David Rientjes <rientjes@google.com>,
	Stephen Wilson <wilsons@start.ca>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	linux-kernel@vger.kernel.org, security@kernel.org
Subject: [kernel-hardening] Re: [PATCH v3] proc: fix races against execve() of /proc/PID/fd**
Date: Mon, 29 Aug 2011 16:02:10 -0700	[thread overview]
Message-ID: <20110829160210.f0f2ce99.akpm@linux-foundation.org> (raw)
In-Reply-To: <20110829180011.GA8839@albatros>

On Mon, 29 Aug 2011 22:00:11 +0400
Vasiliy Kulikov <segoon@openwall.com> wrote:

> Used existing (un)lock_trace functions to check for ptrace_may_access(),
> but instead of using EPERM return code from it use EACCES to be
> consistent with existing proc_pid_follow_link()/proc_pid_readlink()
> return code.  If they differ, attacker can guess what fds exist by
> analyzing stat() return code.

doh, I missed that bit.  Fair enough.

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Vasiliy Kulikov <segoon@openwall.com>
Cc: kernel-hardening@lists.openwall.com,
	Cyrill Gorcunov <gorcunov@gmail.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	David Rientjes <rientjes@google.com>,
	Stephen Wilson <wilsons@start.ca>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	linux-kernel@vger.kernel.org, security@kernel.org
Subject: Re: [PATCH v3] proc: fix races against execve() of /proc/PID/fd**
Date: Mon, 29 Aug 2011 16:02:10 -0700	[thread overview]
Message-ID: <20110829160210.f0f2ce99.akpm@linux-foundation.org> (raw)
In-Reply-To: <20110829180011.GA8839@albatros>

On Mon, 29 Aug 2011 22:00:11 +0400
Vasiliy Kulikov <segoon@openwall.com> wrote:

> Used existing (un)lock_trace functions to check for ptrace_may_access(),
> but instead of using EPERM return code from it use EACCES to be
> consistent with existing proc_pid_follow_link()/proc_pid_readlink()
> return code.  If they differ, attacker can guess what fds exist by
> analyzing stat() return code.

doh, I missed that bit.  Fair enough.

  parent reply	other threads:[~2011-08-29 23:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04 16:20 [kernel-hardening] [PATCH] proc: fix races of /proc/PID/{fd/,fdinfo/,fdinfo/*} Vasiliy Kulikov
2011-08-04 16:20 ` Vasiliy Kulikov
2011-08-23 21:44 ` [kernel-hardening] " Andrew Morton
2011-08-23 21:44   ` Andrew Morton
2011-08-26 13:29   ` [kernel-hardening] [PATCH] proc: fix races against execve() " Vasiliy Kulikov
2011-08-26 13:29     ` Vasiliy Kulikov
2011-08-26 19:40     ` [kernel-hardening] " Andrew Morton
2011-08-26 19:40       ` Andrew Morton
2011-08-27 19:01       ` [kernel-hardening] [PATCH v2] proc: fix races against execve() of /proc/PID/fd** Vasiliy Kulikov
2011-08-27 19:01         ` Vasiliy Kulikov
2011-08-27 19:08         ` [kernel-hardening] " Vasiliy Kulikov
2011-08-27 19:08           ` Vasiliy Kulikov
2011-08-28  9:25         ` [kernel-hardening] " Cyrill Gorcunov
2011-08-28  9:25           ` Cyrill Gorcunov
2011-08-28  9:31           ` [kernel-hardening] " Vasiliy Kulikov
2011-08-28  9:31             ` Vasiliy Kulikov
2011-08-29 18:00             ` [kernel-hardening] [PATCH v3] " Vasiliy Kulikov
2011-08-29 18:00               ` Vasiliy Kulikov
2011-08-29 23:00               ` [kernel-hardening] " Andrew Morton
2011-08-29 23:00                 ` Andrew Morton
2011-08-29 23:02               ` Andrew Morton [this message]
2011-08-29 23:02                 ` Andrew Morton

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=20110829160210.f0f2ce99.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=gorcunov@gmail.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    --cc=security@kernel.org \
    --cc=segoon@openwall.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wilsons@start.ca \
    /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.