RE: [PATCH] Fix memory overwriting issue when copy an address to user space

2020-07-20 Thread David Laight
From: lebon zhou > Sent: 20 July 2020 05:35 > To: da...@davemloft.net; k...@kernel.org > Cc: linux-kernel@vger.kernel.org; net...@vger.kernel.org > Subject: [PATCH] Fix memory overwriting issue when copy an address to user > space > > When application provided buffer size less than sockaddr_stora

Re: [PATCH] Fix memory overwriting issue when copy an address to user space

2020-07-17 Thread David Miller
From: lebon zhou Date: Fri, 17 Jul 2020 10:31:54 + > When application provided buffer size less than sockaddr_storage, then > kernel will overwrite some memory area which may cause memory corruption, > e.g.: in recvmsg case, let msg_name=malloc(8) and msg_namelen=8, then > usually application

Re: [PATCH] Fix memory overwriting issue when copy an address to user space

2020-07-17 Thread Jakub Kicinski
On Fri, 17 Jul 2020 10:31:54 + lebon zhou wrote: > When application provided buffer size less than sockaddr_storage, then > kernel will overwrite some memory area which may cause memory corruption, > e.g.: in recvmsg case, let msg_name=malloc(8) and msg_namelen=8, then > usually application can