Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsafe skb handling #22

Closed
milabs opened this issue May 21, 2018 · 1 comment
Closed

Unsafe skb handling #22

milabs opened this issue May 21, 2018 · 1 comment

Comments

@milabs
Copy link

milabs commented May 21, 2018

data = (char *)((unsigned char *)icmp_header + sizeof(struct icmphdr));
data = (char *)((unsigned char *)tcp_header + sizeof(struct tcphdr));
data = (char *)((unsigned char *)udp_header + sizeof(struct udphdr));

skb_header_pointer() must be used along with local on-stack copy of skb->data portion...

See the example:
https://elixir.bootlin.com/linux/latest/source/net/bridge/netfilter/ebt_ip.c#L36

@f0rb1dd3n
Copy link
Owner

fixed in f667770

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants