lkml.org 
[lkml]   [1996]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: BEWARE! Linux seteuid is broken!
Date

> Possibly not but be incredibly careful when fiddling with this code
> especially with saved uids and exec

I am... 8)

I killed a lot of time searching for setreu(g)ids at my site
and replacing them with seteu(g)ids. It was not easy, I was forced
to port TIRPC and make RPC via UNIX sockets to pass credentials
in secure fashion. I hope it was not just waste of time,
I consider changing real uid as the greatest security hole.

When I decided that eliminated almost all of them I put
'printk' into kernel setreuid to catch remaining programs using it. And...
I was discouraged when discovered that seteuid in Linux == setreuid(-1,..).
I was sure that it MUST be separate syscall, because it MUST not
change saved uids.

Those crazy examples just demonstrate that Linux set....id functions
are broken and they must be changed.

I already did it by replacing pretty useless setfs.ids with correct sete.id.
setfs.id were bad idea (the greatest fault is that fs.id is write only and
it is impossible to save/restore it) and my nfsd does not use setfs.id
in any case.

My "security system" developed under Linux and for Linux
works at any unix flavor that I have around except for Linux. It's funny,
is not it?

Alexey Kuznetsov.


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.087 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site