lkml.org 
[lkml]   [2021]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] drivers/iio: Remove all strcpy() uses
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
>

\
 
 \ /
  Last update: 2021-08-15 17:57    [W:0.048 / U:0.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site