Re: Coverity: __sock_gen_cookie(): Error handling issues

From: Eric Dumazet
Date: Thu Nov 17 2022 - 23:40:31 EST


On Thu, Nov 17, 2022 at 6:16 PM Kees Cook <keescook@xxxxxxxxxxxx> wrote:

>
> It looks like the existing code already works as intended, so no need to
> silence the warning. The comment and reload might be nice to add, just
> to clarify for anyone looking at it again in the future, though.


The current code in net-next is broken, because if we succeed to
change sk->sk_cookie,
we return 0 (instead of @new). So your report was not a false positive.

Thanks.