lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAObL_7GVaRu3+=3pWCXmUz6Drzh_Xm_fmZBZ5027xeDCZjqg7g@mail.gmail.com>
Date:	Thu, 11 Aug 2011 09:27:20 -0400
From:	Andrew Lutomirski <luto@....edu>
To:	Pavel Machek <pavel@....cz>
Cc:	"H. Peter Anvin" <hpa@...or.com>, Andi Kleen <andi@...stfloor.org>,
	x86@...nel.org, linux-kernel@...r.kernel.org,
	torvalds@...ux-foundation.org, lueckintel@...oo.com,
	kimwooyoung@...il.com, Suresh Siddha <suresh.b.siddha@...el.com>
Subject: Re: [RFC v2] x86-64: Allow emulated vsyscalls from user addresses

On Thu, Aug 11, 2011 at 9:16 AM, Pavel Machek <pavel@....cz> wrote:
> Hi!
>
>> They trace control flow through the vsyscall page and recompile that
>> code somewhere else.  Then they expect it to work.  DynamoRIO
>> (http://dynamorio.org/) and Pin (http://www.pintool.org/) are
>> affected.  They crash when tracing programs that use vsyscalls.
>> Valgrind is smart enough not to cause problems.  It crashes on the
>> getcpu vsyscall, but that has nothing to do with emulation.
>>
>> This patch makes each of the three vsyscall entries use a different
>> vector so that they can work when relocated.  It assumes that the
>> code that relocates them is okay with the int instruction acting
>> like ret.  DynamoRIO at least appears to work.
>
> int acting as ret is seriously weird semantics. And no, invalid
> syscall parameters will not cause segfault, just return of -EFAULT. So
> ... can this be changed?

Can which be changed?  int acting as ret already was (in a different
patch, now in tip/x86/vdso), although I still think that user code
should do its best to make no assumptions about the vsyscall page.

invalid syscall parameters do indeed return -EFAULT, but invalid
*v*syscall parameters will segfault in 3.0 and before, since the
vsyscall implementation is just user code and has no exception
handling.

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ