* [PATCH net] flow_dissector: fix false-positive __read_overflow2_field() warning
@ 2022-04-06 21:15 Jakub Kicinski
2022-04-06 21:36 ` Kees Cook
2022-04-08 11:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2022-04-06 21:15 UTC (permalink / raw)
To: davem; +Cc: pabeni, netdev, gustavoars, kurt, keescook, Jakub Kicinski
Bounds checking is unhappy that we try to copy both Ethernet
addresses but pass pointer to the first one. Luckily destination
address is the first field so pass the pointer to the entire header,
whatever.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
I feel like we talked about this one.
I wonder if my position now is consistent with what I said
in the past :)
net/core/flow_dissector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 03b6e649c428..912bda212db2 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -1032,7 +1032,7 @@ bool __skb_flow_dissect(const struct net *net,
key_eth_addrs = skb_flow_dissector_target(flow_dissector,
FLOW_DISSECTOR_KEY_ETH_ADDRS,
target_container);
- memcpy(key_eth_addrs, ð->h_dest, sizeof(*key_eth_addrs));
+ memcpy(key_eth_addrs, eth, sizeof(*key_eth_addrs));
}
proto_again:
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] flow_dissector: fix false-positive __read_overflow2_field() warning
2022-04-06 21:15 [PATCH net] flow_dissector: fix false-positive __read_overflow2_field() warning Jakub Kicinski
@ 2022-04-06 21:36 ` Kees Cook
2022-04-08 11:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2022-04-06 21:36 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, pabeni, netdev, gustavoars, kurt
On Wed, Apr 06, 2022 at 02:15:21PM -0700, Jakub Kicinski wrote:
> Bounds checking is unhappy that we try to copy both Ethernet
> addresses but pass pointer to the first one. Luckily destination
> address is the first field so pass the pointer to the entire header,
> whatever.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Ah yes, thanks! I had prepared this patch last week, but failed to
actually send it. :|
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] flow_dissector: fix false-positive __read_overflow2_field() warning
2022-04-06 21:15 [PATCH net] flow_dissector: fix false-positive __read_overflow2_field() warning Jakub Kicinski
2022-04-06 21:36 ` Kees Cook
@ 2022-04-08 11:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-04-08 11:20 UTC (permalink / raw)
To: Jakub Kicinski; +Cc: davem, pabeni, netdev, gustavoars, kurt, keescook
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Wed, 6 Apr 2022 14:15:21 -0700 you wrote:
> Bounds checking is unhappy that we try to copy both Ethernet
> addresses but pass pointer to the first one. Luckily destination
> address is the first field so pass the pointer to the entire header,
> whatever.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
>
> [...]
Here is the summary with links:
- [net] flow_dissector: fix false-positive __read_overflow2_field() warning
https://git.kernel.org/netdev/net/c/1b808993e194
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:[~2022-04-08 11:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 21:15 [PATCH net] flow_dissector: fix false-positive __read_overflow2_field() warning Jakub Kicinski
2022-04-06 21:36 ` Kees Cook
2022-04-08 11:20 ` 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.