diff options
author | Willem de Bruijn <willemb@google.com> | 2019-04-29 11:46:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-01 11:27:55 -0400 |
commit | b2cf86e1563e33a14a1c69b3e508d15dc12f804c (patch) | |
tree | 4236ee87de8e6e14adabdca0a66f153f4a14b5ba /crypto/cast_common.c | |
parent | fbd019737d71e405f86549fd738f81e2ff3dd073 (diff) |
packet: in recvmsg msg_name return at least sizeof sockaddr_ll
Packet send checks that msg_name is at least sizeof sockaddr_ll.
Packet recv must return at least this length, so that its output
can be passed unmodified to packet send.
This ceased to be true since adding support for lladdr longer than
sll_addr. Since, the return value uses true address length.
Always return at least sizeof sockaddr_ll, even if address length
is shorter. Zero the padding bytes.
Change v1->v2: do not overwrite zeroed padding again. use copy_len.
Fixes: 0fb375fb9b93 ("[AF_PACKET]: Allow for > 8 byte hardware addresses.")
Suggested-by: David Laight <David.Laight@aculab.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'crypto/cast_common.c')
0 files changed, 0 insertions, 0 deletions