Hi,
On 7/14/20 12:42 PM, Andy Shevchenko wrote:
During conversion to use strndup_user() the commit 35d13c7a0512
("platform/x86: thinkpad_acpi: Use strndup_user() in dispatch_proc_write()")
missed the fact that buffer coming thru procfs is not immediately NULL
terminated. We have to limit size wh
During conversion to use strndup_user() the commit 35d13c7a0512
("platform/x86: thinkpad_acpi: Use strndup_user() in dispatch_proc_write()")
missed the fact that buffer coming thru procfs is not immediately NULL
terminated. We have to limit size when calling strndup_user().
Fixes: 35d13c7a0512 ("p
On Tue, Jul 14, 2020 at 12:33 PM Hans de Goede wrote:
> On 7/14/20 10:27 AM, Andy Shevchenko wrote:
> > On Tue, Jul 14, 2020 at 11:21 AM Andy Shevchenko
> > wrote:
> >> On Tue, Jul 14, 2020 at 11:15 AM Hans de Goede wrote:
> >>>
> >>> Commit 35d13c7a0512 ("platform/x86: thinkpad_acpi: Use strndu
Hi,
On 7/14/20 10:27 AM, Andy Shevchenko wrote:
On Tue, Jul 14, 2020 at 11:21 AM Andy Shevchenko
wrote:
On Tue, Jul 14, 2020 at 11:15 AM Hans de Goede wrote:
Commit 35d13c7a0512 ("platform/x86: thinkpad_acpi: Use strndup_user()
in dispatch_proc_write()") cleaned up dispatch_proc_write() by
On Tue, Jul 14, 2020 at 11:21 AM Andy Shevchenko
wrote:
> On Tue, Jul 14, 2020 at 11:15 AM Hans de Goede wrote:
> >
> > Commit 35d13c7a0512 ("platform/x86: thinkpad_acpi: Use strndup_user()
> > in dispatch_proc_write()") cleaned up dispatch_proc_write() by replacing
> > the code to copy the passe
On Tue, Jul 14, 2020 at 11:15 AM Hans de Goede wrote:
>
> Commit 35d13c7a0512 ("platform/x86: thinkpad_acpi: Use strndup_user()
> in dispatch_proc_write()") cleaned up dispatch_proc_write() by replacing
> the code to copy the passed in data from userspae with strndup_user().
user space
> But str
Commit 35d13c7a0512 ("platform/x86: thinkpad_acpi: Use strndup_user()
in dispatch_proc_write()") cleaned up dispatch_proc_write() by replacing
the code to copy the passed in data from userspae with strndup_user().
But strndup_user() expects a 0 terminated input buffer and the buffer
passed to disp