Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1390556
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Andrew Morton <akpm@linux-foundation.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] proc: prevent accessing /proc/<PID>/environ until it's ready |
| Date | Thu, 28 Apr 2016 23:30:03 +0200 |
| Message-ID | <rt1Fx-2Aw-25@gated-at.bofh.it> (permalink) |
| References | <rsZu2-JY-5@gated-at.bofh.it> |
| X-Original-To | Mathias Krause <minipli@googlemail.com> |
| X-Mailer | Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 18 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, Emese Revfy <re.emese@gmail.com>, Pax Team <pageexec@freemail.hu>, Al Viro <viro@zeniv.linux.org.uk>, Mateusz Guzik <mguzik@redhat.com>, Alexey Dobriyan <adobriyan@gmail.com>, Cyrill Gorcunov <gorcunov@openvz.org>, Jarod Wilson <jarod@redhat.com> |
| X-Original-Date | Thu, 28 Apr 2016 14:26:22 -0700 |
| X-Original-Message-ID | <20160428142622.92fad67c88152341075e4294@linux-foundation.org> |
| X-Original-References | <1461870258-17970-1-git-send-email-minipli@googlemail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1390556 |
Show key headers only | View raw
On Thu, 28 Apr 2016 21:04:18 +0200 Mathias Krause <minipli@googlemail.com> wrote:
> If /proc/<PID>/environ gets read before the envp[] array is fully set
> up in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying
> to read more bytes than are actually written, as env_start will already
> be set but env_end will still be zero, making the range calculation
> underflow, allowing to read beyond the end of what has been written.
>
> Fix this as it is done for /proc/<PID>/cmdline by testing env_end for
> zero. It is, apparently, intentionally set last in create_*_tables().
>
> This bug was found by the PaX size_overflow plugin that detected the
> arithmetic underflow of 'this_len = env_end - (env_start + src)' when
> env_end is still zero.
So what are the implications of this? From my reading, a craftily
constructed application could occasionally read arbitrarily large
amounts of kernel memory?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] proc: prevent accessing /proc/<PID>/environ until it's ready Mathias Krause <minipli@googlemail.com> - 2016-04-28 21:10 +0200
Re: [PATCH] proc: prevent accessing /proc/<PID>/environ until it's ready Cyrill Gorcunov <gorcunov@gmail.com> - 2016-04-28 21:30 +0200
Re: [PATCH] proc: prevent accessing /proc/<PID>/environ until it's ready Mateusz Guzik <mguzik@redhat.com> - 2016-04-28 21:30 +0200
Re: [PATCH] proc: prevent accessing /proc/<PID>/environ until it's ready Mathias Krause <minipli@googlemail.com> - 2016-04-28 21:40 +0200
Re: [PATCH] proc: prevent accessing /proc/<PID>/environ until it's ready Alexey Dobriyan <adobriyan@gmail.com> - 2016-04-29 12:20 +0200
Re: [PATCH] proc: prevent accessing /proc/<PID>/environ until it's ready Andrew Morton <akpm@linux-foundation.org> - 2016-04-28 23:30 +0200
Re: [PATCH] proc: prevent accessing /proc/<PID>/environ until it's ready Mathias Krause <minipli@googlemail.com> - 2016-04-29 08:00 +0200
Re: [PATCH] proc: prevent accessing /proc/<PID>/environ until it's ready Andrew Morton <akpm@linux-foundation.org> - 2016-04-28 23:40 +0200
Re: [PATCH] proc: prevent accessing /proc/<PID>/environ until it's ready Mathias Krause <minipli@googlemail.com> - 2016-04-29 08:10 +0200
Re: [PATCH] proc: prevent accessing /proc/<PID>/environ until it's ready Alexey Dobriyan <adobriyan@gmail.com> - 2016-04-29 12:30 +0200
csiph-web