[lkml]   [2003]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] new syscall: flink
H. Peter Anvin wrote:
>Here is a better piece of sample code that actually shows a
>permissions violation happening:
>mkdir("testdir", 0700) = 0
>open("testdir/testfile", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
>write(3, "Ansiktsburk\n", 12) = 12
>close(3) = 0
>open("testdir/testfile", O_RDONLY) = 3
>chmod("testdir", 0) = 0
>open("/proc/self/fd/3", O_RDWR) = 4
>write(4, "Tjo fidelittan hatt!\n", 21) = 21

You're right! Good point. I retract the comments in my previous email.
(I did try an experiment like this, but apparently not the right one.)

My conclusion: /proc/*/fd is a security hole. It should be fixed.
Do you agree?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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