Skip to content
Commit 486efdc8 authored by Willem de Bruijn's avatar Willem de Bruijn Committed by David S. Miller
Browse files

packet: validate msg_namelen in send directly



Packet sockets in datagram mode take a destination address. Verify its
length before passing to dev_hard_header.

Prior to 2.6.14-rc3, the send code ignored sll_halen. This is
established behavior. Directly compare msg_namelen to dev->addr_len.

Change v1->v2: initialize addr in all paths

Fixes: 6b8d95f1 ("packet: validate address length if non-zero")
Suggested-by: default avatarDavid Laight <David.Laight@aculab.com>
Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b2cf86e1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment