]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: raw: Deduct extension header length in rawv6_push_pending_frames
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 10 Jan 2023 00:59:06 +0000 (08:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:42:02 +0000 (11:42 +0100)
commit9898a5426aef67bb8528922096360a75cce2d4a2
tree28663b5fadf425109f7045d406ee17ce48c14df5
parentd30ca6999ddf1fab69b5262822c52387dc698a88
ipv6: raw: Deduct extension header length in rawv6_push_pending_frames

commit cb3e9864cdbe35ff6378966660edbcbac955fe17 upstream.

The total cork length created by ip6_append_data includes extension
headers, so we must exclude them when comparing them against the
IPV6_CHECKSUM offset which does not include extension headers.

Reported-by: Kyle Zeng <zengyhkyle@gmail.com>
Fixes: 18dd928990df ("[IPV6]: IPV6_CHECKSUM socket option can corrupt kernel memory")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/raw.c