[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190501.113101.1983014622975636535.davem@davemloft.net>
Date: Wed, 01 May 2019 11:31:01 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: willemdebruijn.kernel@...il.com
Cc: netdev@...r.kernel.org, David.Laight@...lab.com,
ebiederm@...ssion.com, willemb@...gle.com
Subject: Re: [PATCH net v2] packet: in recvmsg msg_name return at least
sizeof sockaddr_ll
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Date: Mon, 29 Apr 2019 11:46:55 -0400
> From: Willem de Bruijn <willemb@...gle.com>
>
> 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@...lab.com>
> Signed-off-by: Willem de Bruijn <willemb@...gle.com>
Applied and queued up for -stable.
Powered by blists - more mailing lists