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: <4f56a2d0-eb1b-4952-a845-92610515082a@lunn.ch>
Date: Tue, 29 Oct 2024 03:20:27 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Jeremy Kerr <jk@...econstruct.com.au>
Cc: Samuel Mendoza-Jonas <sam@...dozajonas.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>, Vijay Khemka <vijaykhemka@...com>,
	netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] net: ncsi: restrict version sizes when hardware
 doesn't nul-terminate

On Tue, Oct 29, 2024 at 08:31:55AM +0800, Jeremy Kerr wrote:
> Hi Andrew,
> Thanks for checking this out.
> 
> 
> > Is this defined by a standard? Does the standard allow non
> > nul-terminated strings? 
> 
> 
> Yes and yes. The pertinent wording of the spec is:
> 
>    The string is null terminated if the string is smaller than the
>    field size
> 
> However, regardless of what the spec says, we still don't want the
> strlen() in nla_put_string() to continue into arbitrary memory in the
> case there was no nul in the fw_name reported by the device.

I agree with that, but i was thinking that if it was not allowed, we
should be printing a warning telling the user to upgrade their buggy
firmware.

However, its not a bug.

Are there any other strings which will need similar treatment?

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ