]> Pileus Git - ~andy/linux/commit
net: add build-time checks for msg->msg_name size
authorSteffen Hurrle <steffen@hurrle.net>
Fri, 17 Jan 2014 21:53:15 +0000 (22:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Jan 2014 07:04:16 +0000 (23:04 -0800)
commit342dfc306fb32155314dad277f3c3686b83fb9f1
treea0d220f9310725c72bac70945261c9282e7cf305
parentea02f9411d9faa3553ed09ce0ec9f00ceae9885e
net: add build-time checks for msg->msg_name size

This is a follow-up patch to f3d3342602f8bc ("net: rework recvmsg
handler msg_name and msg_namelen logic").

DECLARE_SOCKADDR validates that the structure we use for writing the
name information to is not larger than the buffer which is reserved
for msg->msg_name (which is 128 bytes). Also use DECLARE_SOCKADDR
consistently in sendmsg code paths.

Signed-off-by: Steffen Hurrle <steffen@hurrle.net>
Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
34 files changed:
drivers/isdn/mISDN/socket.c
net/appletalk/ddp.c
net/ax25/af_ax25.c
net/bluetooth/l2cap_sock.c
net/can/bcm.c
net/can/raw.c
net/decnet/af_decnet.c
net/ieee802154/dgram.c
net/ipv4/ip_sockglue.c
net/ipv4/ping.c
net/ipv4/raw.c
net/ipv4/udp.c
net/ipv6/datagram.c
net/ipv6/ping.c
net/ipv6/raw.c
net/ipv6/udp.c
net/ipx/af_ipx.c
net/irda/af_irda.c
net/l2tp/l2tp_ip.c
net/l2tp/l2tp_ip6.c
net/llc/af_llc.c
net/netlink/af_netlink.c
net/netrom/af_netrom.c
net/nfc/llcp_sock.c
net/packet/af_packet.c
net/phonet/datagram.c
net/rds/recv.c
net/rds/send.c
net/rose/af_rose.c
net/rxrpc/ar-output.c
net/tipc/socket.c
net/unix/af_unix.c
net/vmw_vsock/vmci_transport.c
net/x25/af_x25.c