ndisc: Check NS message length before access.
Subsystems (3)
PATCH 1/1 ndisc: Check NS message length before access.
Check message length before accessing "target" field, as we do for other types.
Signed-off-by YOSHIFUJI Hideaki <[email protected]>
--- net/ipv6/ndisc.c | 5 +++++ 1 file changed, 5 insertions(+)
net/ipv6/ndisc.c +5 -0
@@ -671,6 +671,11 @@ static void ndisc_recv_ns(struct sk_buff *skb)bool inc;int is_router =-1 ; +if (skb->len <sizeof (struct nd_msg )) { +ND_PRINTK (2 , warn,"NS: packet too short\n" ); +return ; + } +if (ipv6_addr_is_multicast (&msg->target)) {ND_PRINTK (2 , warn,"NS: multicast target address\n" );return ;
Signature · 1 line
1.7.9.5
From: YOSHIFUJI Hideaki <[email protected]>
Date: Fri, 18 Jan 2013 21:05:03 +0900
Quoted 4 lines
Check message length before accessing "target" field, as we do for other types.
Signed-off-by YOSHIFUJI Hideaki <[email protected]>
Applied.