diff options
author | Phil Sutter <phil@nwl.cc> | 2021-06-08 11:40:57 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-06-09 02:42:52 +0200 |
commit | cf6b5ffdce5a78b2fcb0e53b3a2487c490bcbf7f (patch) | |
tree | bf2d722476e0f24697c80ca97d77172fe4caea26 /net/netfilter/nfnetlink_hook.c | |
parent | e2cf17d3774c323ef6dab6e9f7c0cfc5e742afd9 (diff) | |
download | linux-cf6b5ffdce5a78b2fcb0e53b3a2487c490bcbf7f.tar.gz linux-cf6b5ffdce5a78b2fcb0e53b3a2487c490bcbf7f.tar.bz2 linux-cf6b5ffdce5a78b2fcb0e53b3a2487c490bcbf7f.zip |
netfilter: nft_exthdr: Fix for unsafe packet data read
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: 133dc203d77df ("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>
Diffstat (limited to 'net/netfilter/nfnetlink_hook.c')
0 files changed, 0 insertions, 0 deletions