From: Jens Axboe <axboe@kernel.dk>
To: Kyungtae Kim <kt0755@gmail.com>
Cc: jikos@kernel.org, Byoungyoung Lee <lifeasageek@gmail.com>,
DaeRyong Jeong <threeearcat@gmail.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] floppy: Avoid memory access beyond the array bounds in setup_rw_floppy()
Date: Fri, 26 Oct 2018 08:41:23 -0600 [thread overview]
Message-ID: <46e927f8-268c-866c-75f7-d1406252759a@kernel.dk> (raw)
In-Reply-To: <CAEAjamtxZRiFUYb4re3jRf9naoSyJO7sskChfEgcBh-m-uEKWQ@mail.gmail.com>
On 10/26/18 8:39 AM, Kyungtae Kim wrote:
> diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
> index a8cfa01..41160a1 100644
> --- a/drivers/block/floppy.c
> +++ b/drivers/block/floppy.c
> @@ -3146,6 +3146,9 @@ static int raw_cmd_copyin(int cmd, void __user *param,
> */
> return -EINVAL;
>
> + if (ptr->cmd_count > ARRAY_SIZE(ptr->cmd))
> + return -EINVAL;
> +
> for (i = 0; i < 16; i++)
> ptr->reply[i] = 0;
> ptr->resultcode = 0;
Almost there, the tabs have been turned into spaces. This could be
a mailer issue, what are you using to send out the patch?
--
Jens Axboe
next prev parent reply other threads:[~2018-10-26 14:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-26 14:39 [PATCH] floppy: Avoid memory access beyond the array bounds in setup_rw_floppy() Kyungtae Kim
2018-10-26 14:41 ` Jens Axboe [this message]
2018-10-26 14:51 ` Kyungtae Kim
2018-10-26 14:57 ` Jens Axboe
2018-10-26 15:06 ` Kyungtae Kim
2018-10-26 15:21 ` Bart Van Assche
2018-10-26 15:49 ` Kyungtae Kim
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=46e927f8-268c-866c-75f7-d1406252759a@kernel.dk \
--to=axboe@kernel.dk \
--cc=jikos@kernel.org \
--cc=kt0755@gmail.com \
--cc=lifeasageek@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=threeearcat@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).