* [PATCH net] sctp: fix return value check in __sctp_rcv_asconf_lookup
@ 2021-07-28 2:40 Marcelo Ricardo Leitner
2021-07-28 2:56 ` Xin Long
2021-07-28 8:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Marcelo Ricardo Leitner @ 2021-07-28 2:40 UTC (permalink / raw)
To: netdev; +Cc: linux-sctp, Ben Hutchings, Ilja Van Sprundel, carnil, Xin Long
As Ben Hutchings noticed, this check should have been inverted: the call
returns true in case of success.
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Fixes: 0c5dc070ff3d ("sctp: validate from_addr_param return")
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
---
net/sctp/input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sctp/input.c b/net/sctp/input.c
index eb3c2a34a31c64d5322f326613f4a4a02f8c902e..5ef86fdb11769d9c8a32219c5c7361fc34217b02 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -1203,7 +1203,7 @@ static struct sctp_association *__sctp_rcv_asconf_lookup(
if (unlikely(!af))
return NULL;
- if (af->from_addr_param(&paddr, param, peer_port, 0))
+ if (!af->from_addr_param(&paddr, param, peer_port, 0))
return NULL;
return __sctp_lookup_association(net, laddr, &paddr, transportp);
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] sctp: fix return value check in __sctp_rcv_asconf_lookup
2021-07-28 2:40 [PATCH net] sctp: fix return value check in __sctp_rcv_asconf_lookup Marcelo Ricardo Leitner
@ 2021-07-28 2:56 ` Xin Long
2021-07-28 8:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Xin Long @ 2021-07-28 2:56 UTC (permalink / raw)
To: Marcelo Ricardo Leitner
Cc: network dev, linux-sctp @ vger . kernel . org, Ben Hutchings,
Ilja Van Sprundel, Salvatore Bonaccorso
On Tue, Jul 27, 2021 at 10:41 PM Marcelo Ricardo Leitner
<marcelo.leitner@gmail.com> wrote:
>
> As Ben Hutchings noticed, this check should have been inverted: the call
> returns true in case of success.
>
> Reported-by: Ben Hutchings <ben@decadent.org.uk>
> Fixes: 0c5dc070ff3d ("sctp: validate from_addr_param return")
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> ---
> net/sctp/input.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sctp/input.c b/net/sctp/input.c
> index eb3c2a34a31c64d5322f326613f4a4a02f8c902e..5ef86fdb11769d9c8a32219c5c7361fc34217b02 100644
> --- a/net/sctp/input.c
> +++ b/net/sctp/input.c
> @@ -1203,7 +1203,7 @@ static struct sctp_association *__sctp_rcv_asconf_lookup(
> if (unlikely(!af))
> return NULL;
>
> - if (af->from_addr_param(&paddr, param, peer_port, 0))
> + if (!af->from_addr_param(&paddr, param, peer_port, 0))
> return NULL;
>
> return __sctp_lookup_association(net, laddr, &paddr, transportp);
> --
> 2.31.1
>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] sctp: fix return value check in __sctp_rcv_asconf_lookup
2021-07-28 2:40 [PATCH net] sctp: fix return value check in __sctp_rcv_asconf_lookup Marcelo Ricardo Leitner
2021-07-28 2:56 ` Xin Long
@ 2021-07-28 8:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-28 8:30 UTC (permalink / raw)
To: Marcelo Ricardo Leitner
Cc: netdev, linux-sctp, ben, ivansprundel, carnil, lucien.xin
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Tue, 27 Jul 2021 23:40:54 -0300 you wrote:
> As Ben Hutchings noticed, this check should have been inverted: the call
> returns true in case of success.
>
> Reported-by: Ben Hutchings <ben@decadent.org.uk>
> Fixes: 0c5dc070ff3d ("sctp: validate from_addr_param return")
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
>
> [...]
Here is the summary with links:
- [net] sctp: fix return value check in __sctp_rcv_asconf_lookup
https://git.kernel.org/netdev/net/c/557fb5862c92
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-28 8:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 2:40 [PATCH net] sctp: fix return value check in __sctp_rcv_asconf_lookup Marcelo Ricardo Leitner
2021-07-28 2:56 ` Xin Long
2021-07-28 8:30 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.