lkml.org 
[lkml]   [2010]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: what's papered over by set_fs(USER_DS) in amd64 signal delivery?

* Al Viro <viro@ZenIV.linux.org.uk> wrote:

> [...] IOW, that set_fs() seems to have been useless from the day 1,
> unless I'm missing something really subtle, like e.g. some processes
> deliberately running (in 2.0) with %fs set to something with lower
> limit, with signal handlers allowed to switch back to normal for
> duration. And even that would've been broken, since there wouldn't be
> a matching set_fs() in sigreturn()...

I dont recall us ever having done anything particularly 'clever' with
in-kernel set_fs()/restore_fs(). Beyond fork/clone it was always
supposed to be set/restored in a balanced manner. We sometimes leaked it
unintentionally, and those were security holes.

( Cleverness with security primitives was in fact always actively
discouraged, even in the early days, as cleverness has the uncanny
tendency to bit-rot and then has the tendency to slow-convert to a
security hole by stealth. We always wanted obvious, boringly dumb,
fail-safe primitives, which can take a few years of bitrot robustly. )

Thanks,

Ingo


\
 
 \ /
  Last update: 2010-09-27 20:09    [W:0.102 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site