[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210815165932.2e66a04d@jic23-huawei>
Date: Sun, 15 Aug 2021 16:59:32 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Len Baker <len.baker@....com>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Lars-Peter Clausen <lars@...afoo.de>,
David Laight <David.Laight@...lab.com>,
Kees Cook <keescook@...omium.org>,
linux-hardening@...r.kernel.org,
linux-iio <linux-iio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4] drivers/iio: Remove all strcpy() uses
On Sun, 15 Aug 2021 15:45:55 +0100
Jonathan Cameron <jic23@...nel.org> wrote:
> On Sun, 15 Aug 2021 10:19:49 +0200
> Len Baker <len.baker@....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@....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@...il.com>
>
> >
> > Thank you too Andy (and folks) for your help on this.
> >
> > Regards,
> > Len
>
Powered by blists - more mailing lists