[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3d0cafe11000fe1cad7b4ad13865b3bcfd2ad27.camel@codeconstruct.com.au>
Date: Tue, 29 Oct 2024 12:06:58 +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,
> > 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.
Gotchya. All fine there.
> Are there any other strings which will need similar treatment?
This is the only nla_put_string() in the ncsi code, and there are no
other string-adjacent components of data represented in the spec (that
I have come across, at least).
Cheers,
Jeremy
Powered by blists - more mailing lists