mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[IPV6]: IPV6_CHECKSUM socket option can corrupt kernel memory
So here is a patch that introduces skb_store_bits -- the opposite of skb_copy_bits, and uses them to read/write the csum field in rawv6. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fd92833a52
commit
357b40a18b
3 changed files with 130 additions and 13 deletions
|
@ -1183,6 +1183,8 @@ extern unsigned int skb_checksum(const struct sk_buff *skb, int offset,
|
|||
int len, unsigned int csum);
|
||||
extern int skb_copy_bits(const struct sk_buff *skb, int offset,
|
||||
void *to, int len);
|
||||
extern int skb_store_bits(const struct sk_buff *skb, int offset,
|
||||
void *from, int len);
|
||||
extern unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb,
|
||||
int offset, u8 *to, int len,
|
||||
unsigned int csum);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue