All of lore.kernel.org
 help / color / mirror / Atom feed
From: <yang.yang29@zte.com.cn>
To: <James.Bottomley@HansenPartnership.com>
Cc: <deller@gmx.de>, <linux-parisc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <xu.panda@zte.com.cn>
Subject: Re: [PATCH linux-next] parisc: use strscpy() to instead of strncpy()
Date: Wed, 28 Dec 2022 09:25:45 +0800 (CST)	[thread overview]
Message-ID: <202212280925459299284@zte.com.cn> (raw)
In-Reply-To: <ca6e40fff619aa16cb178382f5404d047ed08f3c.camel@HansenPartnership.com>

> the array buf[] is actually buf[count], so if count < 64 then
> sizeof(buf) < sizeof(in) and you're copying whatever is after buf on
> the stack or wherever it comes from. The amount you copy into in[]
> truly has to be the smaller of count and sizeof(in).  These are file
> operations, so you shouldn't rely on buf[] being null terminated
> (kernfs ensures it is, but it's a dangerous thing to rely on in the
> face of someone trying to exploit a stack smashing attack).

Should we send patchv3 which is back to v1, or we directly use
patchv1 to continue the reviewing?

Thanks!

  reply	other threads:[~2022-12-28  1:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-23  2:40 [PATCH linux-next] parisc: use strscpy() to instead of strncpy() yang.yang29
2022-12-23  7:55 ` Helge Deller
2022-12-27 12:38   ` James Bottomley
2022-12-27 21:38     ` Helge Deller
2022-12-27 22:43       ` James Bottomley
2022-12-28  1:25         ` yang.yang29 [this message]
2022-12-28  7:28         ` Helge Deller

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=202212280925459299284@zte.com.cn \
    --to=yang.yang29@zte.com.cn \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=deller@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=xu.panda@zte.com.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.