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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 18 Dec 2007 15:29:19 -0800
From:	"Luck, Tony" <tony.luck@...el.com>
To:	"Matthew Wilcox" <matthew@....cx>,
	"Shi Weihua" <shiwh@...fujitsu.com>
Cc:	<linux-kernel@...r.kernel.org>, <linux-ia64@...r.kernel.org>
Subject: RE: [PATCH RFC][try 2] IA64 signal : remove redundant code in setup_sigcontext()

>> This patch removes some redundant code in the function setup_sigcontext().
>> 
>> The registers ar.ccv,b7,r14,ar.csd,ar.ssd,r2-r3 and r16-r31 are not restored 
>> in restore_sigcontext() when (flags & IA64_SC_FLAG_IN_SYSCALL) is true. 
>> So we don't need to zero those variables in setup_sigcontext().
>
> Erm, couldn't those registers contain information the process shouldn't
> see?

No, this looks safe.  setup_sigcontext() is stashing things out on the
user stack to be used by restore_sigcontext() should the application want
to return from the signal handler.  But restore_sigcontext isn't actually
in charge of putting values into machine registers, it just does the copy
back from user space to the place where the asm code will restore registers
on the way back to userland.  In this instance "restored" means "set back to
the state they had before the signal happened".  If they aren't "restored"
they'll have scratch values ... but those scratch values will have come
from the application (while it was executing the signal handler).  Not
leaked from the kernel or from some other application.

-Tony
--
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