From: Jonathan Cameron <jic23@kernel.org>
To: Len Baker <len.baker@gmx.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
Lars-Peter Clausen <lars@metafoo.de>,
David Laight <David.Laight@aculab.com>,
Kees Cook <keescook@chromium.org>,
linux-hardening@vger.kernel.org,
linux-iio <linux-iio@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4] drivers/iio: Remove all strcpy() uses
Date: Sun, 15 Aug 2021 16:59:32 +0100 [thread overview]
Message-ID: <20210815165932.2e66a04d@jic23-huawei> (raw)
In-Reply-To: <20210815154555.6770bc8d@jic23-huawei>
On Sun, 15 Aug 2021 15:45:55 +0100
Jonathan Cameron <jic23@kernel.org> wrote:
> On Sun, 15 Aug 2021 10:19:49 +0200
> Len Baker <len.baker@gmx.com> wrote:
>
> > Hi Andy,
> >
> > On Sat, Aug 14, 2021 at 10:36:18PM +0300, Andy Shevchenko wrote:
> > > On Sat, Aug 14, 2021 at 4:55 PM Len Baker <len.baker@gmx.com> wrote:
> > > >
> > > > strcpy() performs no bounds checking on the destination buffer. This
> > > > could result in linear overflows beyond the end of the buffer, leading
> > > > to all kinds of misbehaviors. So, remove all the uses and add
> > > > devm_kstrdup() or devm_kasprintf() instead.
> > > >
> > > > This patch is an effort to clean up the proliferation of str*()
> > > > functions in the kernel and a previous step in the path to remove
> > > > the strcpy function from the kernel entirely [1].
> > > >
> > > > [1] https://github.com/KSPP/linux/issues/88
> > >
> > > Thank you very much for doing this!
> > > Now I like the result,
> Agreed and applied to the togreg branch of iio.git, pushed out as testing
> for 0-day to poke at it and see if we missed anything.
Dropped it for now so that Joe's comment can be addressed / discussed.
Jonathan
>
> Thanks,
>
> Jonathan
> > > Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>
> >
> > Thank you too Andy (and folks) for your help on this.
> >
> > Regards,
> > Len
>
next prev parent reply other threads:[~2021-08-15 15:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-14 13:55 [PATCH v4] drivers/iio: Remove all strcpy() uses Len Baker
2021-08-14 19:36 ` Andy Shevchenko
2021-08-15 8:19 ` Len Baker
2021-08-15 14:45 ` Jonathan Cameron
2021-08-15 15:59 ` Jonathan Cameron [this message]
2021-08-15 15:06 ` Joe Perches
2021-08-15 16:36 ` Len Baker
2021-08-15 16:58 ` Joe Perches
2021-08-15 17:12 ` Len Baker
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=20210815165932.2e66a04d@jic23-huawei \
--to=jic23@kernel.org \
--cc=David.Laight@aculab.com \
--cc=andy.shevchenko@gmail.com \
--cc=keescook@chromium.org \
--cc=lars@metafoo.de \
--cc=len.baker@gmx.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-iio@vger.kernel.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 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.