Re: [PATCH] audit: fix incomplete NETFILTER_PKT records and return void
From: Florian Westphal
Date: Tue Nov 10 2026 - 09:07:00 EST
Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
> > + goto unknown_proto;
> > + if (ih->version != 4 || ih->ihl < 5)
> > + goto unknown_proto;
> > +
> > + thoff = skb_network_offset(skb) + ih->ihl * 4;
> > + frag = ntohs(ih->frag_off) & IP_OFFSET;
>
> Are we going to add all these validations everywhere in the code?
>
> So we will have to validate that the IPv4 header is well-formed over
> and over again?
Bridge doesn't check/validate ip headers.
I agree it would be best to have a central helper for this, this
copypastry has gotten out of hand.