Search Linux Wireless

RE: [RFC v3 2/2] iwlwifi: mvm: send large SKBs to the transport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> On Wed, 2015-10-21 at 21:34 +0300, Emmanuel Grumbach wrote:
> > +
> > +		if (skb->protocol == htons(ETH_P_IP)) {
> > +			ip_hdr(tmp)->id = ip_hdr(skb)->id;
> 
> Too late, you already called consume_skb(skb).
> So this is a potential use after free.

Ouch - thanks for catching this!

> 
> > +			be16_add_cpu(&ip_hdr(tmp)->id, i *
> num_subframes);
> > +		}
> > +
> 
> 
> I would use
> base_id = ip_hdr(skb)->id; // before the consume_skb(skb)
> ip_hdr(tmp)->id = htons(base_id + i * num_subframes);
> 
Sure - I will.

I will send a v4 with the fixes.
��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux