diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-04-06 23:15:21 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-04-08 13:16:59 +0200 |
commit | 1b808993e19447731e823b1313ee4e8da7fd92a0 (patch) | |
tree | 04f0b87fc0587d5dd25399ceb3487936138d06d1 /net | |
parent | veth: Ensure eth header is in skb's linear part (diff) | |
download | linux-1b808993e19447731e823b1313ee4e8da7fd92a0.tar.xz linux-1b808993e19447731e823b1313ee4e8da7fd92a0.zip |
flow_dissector: fix false-positive __read_overflow2_field() warning
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>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/flow_dissector.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index 9bd887610c18..6f7ec72016dc 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: |