diff options
author | Daisuke Matsuda <matsuda-daisuke@fujitsu.com> | 2022-09-29 11:00:23 +0300 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2022-09-29 12:57:56 +0300 |
commit | 8ad891ed435ba24465e0650942267e90a060675f (patch) | |
tree | 699388d68db1945eb2d5abe2d7c773f79f2ecaaf /drivers/infiniband/sw/rxe/rxe_icrc.c | |
parent | 4b83ddc0924752ebb5f99e84e00d1cb725a9aa51 (diff) | |
download | linux-8ad891ed435ba24465e0650942267e90a060675f.tar.xz |
RDMA/rxe: Remove error/warning messages from packet receiver path
Incoming packets to rxe are passed from UDP layer using an encapsulation
socket. If there are any clients reachable to a node, they can invoke the
encapsulation handler arbitrarily by sending malicious or irrelevant
packets. This can potentially cause a message overflow and a subsequent
slowdown on the node.
Signed-off-by: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
Link: https://lore.kernel.org/r/20220929080023.304242-1-matsuda-daisuke@fujitsu.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_icrc.c')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_icrc.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_icrc.c b/drivers/infiniband/sw/rxe/rxe_icrc.c index e03af3012590..46bb07c5c4df 100644 --- a/drivers/infiniband/sw/rxe/rxe_icrc.c +++ b/drivers/infiniband/sw/rxe/rxe_icrc.c @@ -151,18 +151,8 @@ int rxe_icrc_check(struct sk_buff *skb, struct rxe_pkt_info *pkt) payload_size(pkt) + bth_pad(pkt)); icrc = ~icrc; - if (unlikely(icrc != pkt_icrc)) { - if (skb->protocol == htons(ETH_P_IPV6)) - pr_warn_ratelimited("bad ICRC from %pI6c\n", - &ipv6_hdr(skb)->saddr); - else if (skb->protocol == htons(ETH_P_IP)) - pr_warn_ratelimited("bad ICRC from %pI4\n", - &ip_hdr(skb)->saddr); - else - pr_warn_ratelimited("bad ICRC from unknown\n"); - + if (unlikely(icrc != pkt_icrc)) return -EINVAL; - } return 0; } |