[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA85sZuGQGM+mNOtD+B=GQJjH3UaoqUkZkoeiKZ+ZD+7FR5ucQ@mail.gmail.com>
Date: Fri, 28 Jun 2024 11:30:48 +0200
From: Ian Kumlien <ian.kumlien@...il.com>
To: Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: IP oversized ip oacket from - header size should be skipped?
Hi,
In net/ipv4/ip_fragment.c line 412:
static int ip_frag_reasm(struct ipq *qp, struct sk_buff *skb,
struct sk_buff *prev_tail, struct net_device *dev)
{
...
len = ip_hdrlen(skb) + qp->q.len;
err = -E2BIG;
if (len > 65535)
goto out_oversize;
....
We can expand the expression to:
len = (ip_hdr(skb)->ihl * 4) + qp->q.len;
But it's still weird since the definition of q->len is: "total length
of the original datagram"
Which should mean that we are comparing total length + ip header size
instead of just total length?
Powered by blists - more mailing lists