Skip to content

Commit 0de6a47

Browse files
committed
net/neighbor: clear error in case strict check is not set
Commit 51183d2 ("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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e64285f commit 0de6a47

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/core/neighbour.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2824,6 +2824,7 @@ static int neigh_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
28242824
err = neigh_valid_dump_req(nlh, cb->strict_check, &filter, cb->extack);
28252825
if (err < 0 && cb->strict_check)
28262826
return err;
2827+
err = 0;
28272828

28282829
s_t = cb->args[0];
28292830

0 commit comments

Comments
 (0)