mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Seungil Kang <sil.kang@samsung.com>
Cc: bhe@redhat.com, mingo@kernel.org, akpm@linux-foundation.org,
	gregkh@linuxfoundation.org, herbert@gondor.apana.org.au,
	tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib/cmdline: prevent unintented access to address
Date: Wed, 12 Aug 2020 11:51:36 +0300	[thread overview]
Message-ID: <20200812085136.GH1891694@smile.fi.intel.com> (raw)
In-Reply-To: <20200812025402.15695-1-sil.kang@samsung.com>

On Wed, Aug 12, 2020 at 11:54:02AM +0900, Seungil Kang wrote:

Thanks for the patch, my comments below.

> When args = "\"\0", "i" will be 0 and args[i-1] is used (line:238)

Can you be less ambiguous with the args value? (Perhaps provide a hexdump of it
for better understanding)

> Because of "i" is an unsigned int type,
> the function will access at args[0xFFFFFFFF]
> It can make a crash

Please, use proper punctuation, I'm lost where is the sentence and what are the
logical parts of them.

Can you point out to the code that calls this and leads to a crash?

>  lib/cmdline.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Can you provide a KUnit test module which can check the case?

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2020-08-12  9:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200812025432epcas1p1b810c6b94adf533d5cae3ef6a24ca9a2@epcas1p1.samsung.com>
2020-08-12  2:54 ` Seungil Kang
2020-08-12  8:51   ` Andy Shevchenko [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=20200812085136.GH1891694@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=sil.kang@samsung.com \
    --cc=tglx@linutronix.de \
    /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®