mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Suren Baghdasaryan <surenb@google.com>,
	mingo@redhat.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	linux-kernel@vger.kernel.org, kernel-team@android.com
Subject: Re: [PATCH] psi: Fix OOB write when writing 0 bytes to psi files
Date: Thu, 6 Feb 2020 15:03:29 +0100	[thread overview]
Message-ID: <20200206140329.GX14879@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20200204185523.GC9027@cmpxchg.org>

On Tue, Feb 04, 2020 at 01:55:23PM -0500, Johannes Weiner wrote:
> On Mon, Feb 03, 2020 at 01:22:16PM -0800, Suren Baghdasaryan wrote:
> > Issuing write() with count parameter set to 0 on any file under
> > /proc/pressure/ will cause an OOB write because of the access to
> > buf[buf_size-1] when NUL-termination is performed. Fix this by checking
> > for buf_size to be non-zero.
> > 
> > Signed-off-by: Suren Baghdasaryan <surenb@google.com>
> 
> Acked-by: Johannes Weiner <hannes@cmpxchg.org>

Thanks!

  reply	other threads:[~2020-02-06 14:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 21:22 Suren Baghdasaryan
2020-02-04 18:55 ` Johannes Weiner
2020-02-06 14:03   ` Peter Zijlstra [this message]
2020-02-11 12:47 ` [tip: sched/urgent] sched/psi: Fix OOB write when writing 0 bytes to PSI files tip-bot2 for Suren Baghdasaryan

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=20200206140329.GX14879@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=hannes@cmpxchg.org \
    --cc=juri.lelli@redhat.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=surenb@google.com \
    --cc=vincent.guittot@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®