RE: Does sendfile() copy extended attributes?

Joseph D. Wagner
2003-12-21T11:01:24Z

>> Because that violates one of the Immutable Laws of Security -- "If
>> you're running someone else's program, it's not your program anymore."

> That is equally the case if you're running someone else's function.

Sendfile() is a KERNEL function. If a hacker has compromised the kernel, what's the point of exploiting a PRIVILEGE ELEVATION vulnerability in a program? You don't get any higher privileges than the kernel itself.

> A hacker could also change libc.so and thereby change the copy function.

Not without ALREADY compromising the root account. Remember, the vulnerability I'm addressing is PRIVILEGE ELEVATION. You can't elevate privileges any higher than root.

> You are imagining a black box function which is specified to copy a
> file and its attributes. How can you know that function does not work
> by calling an external program?

I didn't say it doesn't work. I just said that executing an external program is too much of a security risk.

Joseph D. Wagner