]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: ncsi: Fix buffer overflow in fetching version id
authorHari Kalavakunta <kalavakunta.hari.prasad@gmail.com>
Tue, 10 Jun 2025 19:33:38 +0000 (12:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:58 +0000 (16:25 +0200)
commitf7e75e80e84156d651ea4d4a112ebf183aecbfbb
treecb110de2ec0864300b73a535dd75e972b5e6d00f
parent320700dae2b958a427b810ee422e91747f45810c
net: ncsi: Fix buffer overflow in fetching version id

[ Upstream commit 8e16170ae972c7fed132bc928914a2ffb94690fc ]

In NC-SI spec v1.2 section 8.4.44.2, the firmware name doesn't
need to be null terminated while its size occupies the full size
of the field. Fix the buffer overflow issue by adding one
additional byte for null terminator.

Signed-off-by: Hari Kalavakunta <kalavakunta.hari.prasad@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Link: https://patch.msgid.link/20250610193338.1368-1-kalavakunta.hari.prasad@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ncsi/internal.h
net/ncsi/ncsi-rsp.c