netfilter: nft_exthdr: Fix for unsafe packet data read
stable inclusion from stable-v5.10.198 commit fb28f89d50c0fad6da851b98526368c3709f17be category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I987V5 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fb28f89d50c0fad6da851b98526368c3709f17be -------------------------------- [ Upstream commit cf6b5ffd ] While iterating through an SCTP packet's chunks, skb_header_pointer() is called for the minimum expected chunk header size. If (that part of) the skbuff is non-linear, the following memcpy() may read data past temporary buffer '_sch'. Use skb_copy_bits() instead which does the right thing in this situation. Fixes: 133dc203 ("netfilter: nft_exthdr: Support SCTP chunks") Suggested-by:Florian Westphal <fw@strlen.de> Signed-off-by:
Phil Sutter <phil@nwl.cc> Reviewed-by:
Florian Westphal <fw@strlen.de> Signed-off-by:
Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment