From: Tejun Heo <tj@kernel.org>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv3] Fix range checks in kernfs_get_target_path
Date: Mon, 27 Aug 2018 07:03:17 -0700 [thread overview]
Message-ID: <20180827140317.GD3978217@devbig004.ftw2.facebook.com> (raw)
In-Reply-To: <AM5PR0701MB265723084A8E48954B914CF4E4340@AM5PR0701MB2657.eurprd07.prod.outlook.com>
On Sun, Aug 26, 2018 at 10:55:24AM +0000, Bernd Edlinger wrote:
> Ping...
> Sorry, I had actually completely forgotten about this one.
>
> On 07/07/18 19:52, Bernd Edlinger wrote:
> > The terminating NUL byte is only there because the buffer is
> > allocated with kzalloc(PAGE_SIZE, GFP_KERNEL), but since the
> > range-check is off-by-one, and PAGE_SIZE==PATH_MAX, the
> > returned string may not be zero-terminated if it is exactly
> > PATH_MAX characters long. Furthermore also the initial loop
> > may theoretically exceed PATH_MAX and cause a fault.
> >
> > Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
prev parent reply other threads:[~2018-08-27 14:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-07 17:52 [PATCHv3] Fix range checks in kernfs_get_target_path Bernd Edlinger
2018-08-26 10:55 ` Bernd Edlinger
2018-08-27 14:03 ` Tejun Heo [this message]
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=20180827140317.GD3978217@devbig004.ftw2.facebook.com \
--to=tj@kernel.org \
--cc=bernd.edlinger@hotmail.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox