[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e6863bfb99c50314d83e2b8a3ab8f1fabe05e912.camel@codeconstruct.com.au>
Date: Tue, 29 Oct 2024 08:31:55 +0800
From: Jeremy Kerr <jk@...econstruct.com.au>
To: Andrew Lunn <andrew@...n.ch>
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
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.
Cheers,
Jeremy
Powered by blists - more mailing lists