[PATCH 2/2] stdio: fix stdio_deregister_dev()

Tom Rini trini at konsulko.com
Tue Oct 10 14:58:55 CEST 2023


On Fri, Sep 29, 2023 at 02:47:17AM +0200, Heinrich Schuchardt wrote:

> When copying the name of a stdio device we must ensure that it is NUL
> terminated before passing it to strcmp() to avoid a buffer overrun.
> 
> Truncating the name field leads to failure to deregister a stdio device.
> When copying we must ensure that the name field sizes match.
> 
> Addresses-Coverity-ID: 350462 String not null terminated
> Fixes: 5294e97832a6 ("stdio: extend "name" to 32 symbols")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231010/d9055541/attachment.sig>


More information about the U-Boot mailing list