]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rxrpc: Fix return from none_validate_challenge()
authorDavid Howells <dhowells@redhat.com>
Tue, 27 May 2025 15:01:43 +0000 (16:01 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 29 May 2025 10:03:21 +0000 (12:03 +0200)
commitfd579a2ebbe4b7e6b388915a50d904e772a35c61
tree6c237455686e5e034336a37282eb53a013fe6c54
parentf41a94aade120dc60322865f363cee7865f2df01
rxrpc: Fix return from none_validate_challenge()

Fix the return value of none_validate_challenge() to be explicitly true
(which indicates the source packet should simply be discarded) rather than
implicitly true (because rxrpc_abort_conn() always returns -EPROTO which
gets converted to true).

Note that this change doesn't change the behaviour of the code (which is
correct by accident) and, in any case, we *shouldn't* get a CHALLENGE
packet to an rxnull connection (ie. no security).

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lists.infradead.org/pipermail/linux-afs/2025-April/009738.html
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: "David S. Miller" <davem@davemloft.net>
cc: Eric Dumazet <edumazet@google.com>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: netdev@vger.kernel.org
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/10720.1748358103@warthog.procyon.org.uk
Fixes: 5800b1cf3fd8 ("rxrpc: Allow CHALLENGEs to the passed to the app for a RESPONSE")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/rxrpc/insecure.c