]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/neighbor: clear error in case strict check is not set
authorJakub Kicinski <kuba@kernel.org>
Fri, 15 Nov 2024 00:32:21 +0000 (16:32 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:40 +0000 (19:51 +0100)
commita7b8f71c7a29e5f5c9eaf76d92afce6600b217cc
treee35ddf54a25b6e42646fc331eade13919bed52b3
parent4e83046d2bc9673dc8cc8e1a967fb843cdef1093
net/neighbor: clear error in case strict check is not set

[ Upstream commit 0de6a472c3b38432b2f184bd64eb70d9ea36d107 ]

Commit 51183d233b5a ("net/neighbor: Update neigh_dump_info for strict
data checking") added strict checking. The err variable is not cleared,
so if we find no table to dump we will return the validation error even
if user did not want strict checking.

I think the only way to hit this is to send an buggy request, and ask
for a table which doesn't exist, so there's no point treating this
as a real fix. I only noticed it because a syzbot repro depended on it
to trigger another bug.

Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241115003221.733593-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/neighbour.c