lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zc4Au5Q_rOAx7_4Y@smile.fi.intel.com>
Date: Thu, 15 Feb 2024 14:16:59 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	Rob Herring <robh+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Robin van der Gracht <robin@...tonic.nl>,
	Paul Burton <paulburton@...nel.org>
Subject: Re: [PATCH v2 10/15] auxdisplay: linedisp: Provide a small buffer in
 the struct linedisp

On Thu, Feb 15, 2024 at 11:40:44AM +0100, Geert Uytterhoeven wrote:
> On Mon, Feb 12, 2024 at 6:04 PM Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:

..

> > +       linedisp->buf = buf ? buf : linedisp->curr;
> > +       linedisp->num_chars = buf ? num_chars : min(num_chars, LINEDISP_DEFAULT_BUF_SZ);
> 
> I think it would be safer to return an error if buf == NULL and
> num_chars < LINEDISP_DEFAULT_BUF_SZ.

I think you meant >= ?

> Else a careless driver that doesn't check linedisp->num_chars might
> overflow the buffer.

Okay, check has been added.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ