From: Johannes Weiner <hannes@cmpxchg.org>
To: Suren Baghdasaryan <surenb@google.com>
Cc: mingo@redhat.com, peterz@infradead.org, 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: Tue, 4 Feb 2020 13:55:23 -0500 [thread overview]
Message-ID: <20200204185523.GC9027@cmpxchg.org> (raw)
In-Reply-To: <20200203212216.7076-1-surenb@google.com>
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 Suren.
next prev parent reply other threads:[~2020-02-04 18:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-03 21:22 [PATCH] psi: Fix OOB write when writing 0 bytes to psi files Suren Baghdasaryan
2020-02-04 18:55 ` Johannes Weiner [this message]
2020-02-06 14:03 ` Peter Zijlstra
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=20200204185523.GC9027@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--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=peterz@infradead.org \
--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