]> git.baikalelectronics.ru Git - kernel.git/commit
udp: ipv4: fix potential use after free in udp_v4_early_demux()
authorEric Dumazet <edumazet@google.com>
Wed, 11 Dec 2013 16:10:05 +0000 (08:10 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Dec 2013 21:10:14 +0000 (16:10 -0500)
commit88f9330383aded676e07d3598ce825144e6f29a1
treea04eec671093bb727ba8aacb8da6a289e6b77f45
parent3575853e43f712f34c73e6145417bdfbade8a4d7
udp: ipv4: fix potential use after free in udp_v4_early_demux()

pskb_may_pull() can reallocate skb->head, we need to move the
initialization of iph and uh pointers after its call.

Fixes: c8cbefced7fa ("udp: ipv4: Add udp early demux")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Shawn Bohrer <sbohrer@rgmadvisors.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c