Pablo Virolainen wrote:
So I should write something like following instead?
if (!get_user(addrlen,&target_addrlen)) {
return -EFAULT
}
Yes.
The code seems to assume target_sockaddr == sockaddr, so why allocate
temporary buffer and then do copying?
If the assumpti
Fabrice Bellard wrote:
> Hi,
>
> OK for the bug report, but the fix is not correct because the problem
> is generic. [get|put]_user() and the other functions should be used
> everywhere to communicate with the "user" space and to generate the
> -EFAULT error if the address is not correct. For that
Hi,
OK for the bug report, but the fix is not correct because the problem is
generic. [get|put]_user() and the other functions should be used
everywhere to communicate with the "user" space and to generate the
-EFAULT error if the address is not correct. For that purpose the host
signal SIGSE
Following code crashes qemu user emulation.
#include
#include
int main() {
accept(0,NULL,NULL);
return 0;
}
Pablo Virolainen
Index: linux-user/syscall.c
===
RCS file: /sources/qemu/qemu/linux-user/syscall.c,v
retr