rxrpc: Fix return from none_validate_challenge()
Subsystems (3)
David Howells
maintainerPATCH 1/1 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).
--- net/rxrpc/insecure.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/rxrpc/insecure.c +3 -2
@@ -45,8 +45,9 @@ static void none_free_call_crypto(struct rxrpc_call *call)static bool none_validate_challenge (struct rxrpc_connection *conn,struct sk_buff *skb) { -return rxrpc_abort_conn (conn, skb,RX_PROTOCOL_ERROR , -EPROTO , - rxrpc_eproto_rxnull_challenge); +rxrpc_abort_conn (conn, skb,RX_PROTOCOL_ERROR , -EPROTO , + rxrpc_eproto_rxnull_challenge); +return true; } static int none_sendmsg_respond_to_challenge(struct sk_buff *challenge,
Quoted 12 lines · David Howells
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 (becauserxrpc_abort_conn()always returns-EPROTOwhich 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).
...
Paolo Abeni
maintainerQuoted 9 lines · David Howells
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 (becauserxrpc_abort_conn()always returns-EPROTOwhich 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).
Quoted 11 lines
Reported-by Dan Carpenter <[email protected]>Signed-off-by David Howells <[email protected]>cc Marc Dionne <[email protected]>cc Jakub Kicinski <[email protected]>cc "David S. Miller" <[email protected]>cc Eric Dumazet <[email protected]>cc Paolo Abeni <[email protected]>cc Simon Horman <[email protected]>
net-next is closed for the merge window, but this is actually a fix for code that is already in net (since Linus pulled and the trees are forwarded).
We can apply it to net, no need to repost, but could you please provided a suitable Fixes tag?
Thanks!
Paolo
David Howells
maintainerQuoted 3 lines · Paolo Abeni
net-next is closed for the merge window, but this is actually a fix for code that is already in net (since Linus pulled and the trees are forwarded).
Yeah - it wasn't pulled yet when I posted it.
Quoted 2 lines
We can apply it to net, no need to repost, but could you please provided a suitable Fixes tag?
Thanks,
David
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:
Quoted 10 lines · On Tue, 27 May 2025 16:01:43 +0100 you wrote:
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 (becauserxrpc_abort_conn()always returns-EPROTOwhich 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).
[...]
Here is the summary with links:
- [net-next] rxrpc: Fix return from none_validate_challenge()
https://git.kernel.org/netdev/net/c/fd579a2ebbe4
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html