Please drop this patch.
I rechecked the code earlier and there is no out-of-bounds access to
fix here, so the commit message is wrong.
skb_pull() returns NULL without modifying the skb when hdr_len is
larger than skb->len, and when it does pull it leaves skb->data +
skb->len unchanged. Either way
trailer = (struct nc_trailer *)(skb->data + skb->len - sizeof *trailer);
resolves to the last two bytes of the frame as received, which is in
bounds because of the earlier skb->len < hard_header_len check. The
read of skb->data[packet_len] is likewise already guarded by the
packet_len >= skb->len test above it.
Thank you.
pw-bot: changes-requested