Commit f0484c85 authored by Alexander Aring's avatar Alexander Aring Committed by openeuler-sync-bot
Browse files

net: rpl: fix rpl header size calculation

stable inclusion
from stable-v5.10.179
commit c972851d3848647f57cd8d5625c48663410c3f96
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8C809

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c972851d3848647f57cd8d5625c48663410c3f96

--------------------------------

[ Upstream commit 4e006c7a ]

This patch fixes a missing 8 byte for the header size calculation. The
ipv6_rpl_srh_size() is used to check a skb_pull() on skb->data which
points to skb_transport_header(). Currently we only check on the
calculated addresses fields using CmprI and CmprE fields, see:

https://www.rfc-editor.org/rfc/rfc6554#section-3



there is however a missing 8 byte inside the calculation which stands
for the fields before the addresses field. Those 8 bytes are represented
by sizeof(struct ipv6_rpl_sr_hdr) expression.

Fixes: 8610c7c6 ("net: ipv6: add support for rpl sr exthdr")
Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
Reported-by: default avatarmaxpl0it <maxpl0it@protonmail.com>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
(cherry picked from commit c95d6f0a)
parent 5fa0926f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment