Re: The disappearing sys_call_table export.

Yoav Weiss
2003-05-10T19:54:12Z

> This approach, while it would solve this particular problem, has a
> grave flow. Consider the case where the first copy in the
> original_syscall is to copy a user space structure, which has embedded
> user space pointers... The set_fs() will cause future
> copy_from_user/copy_to_user in original_syscall() calls to succeed
> even if the user supplied pointer is in kernel space.

You're right, which is why I wouldn't offer it as a general mechanism. I
was merely offering a method to solve the current issue and fix Masud's
problem. This solution is good in many cases but dangerous in others. It
can be used as long as you inspect the original syscall to make sure its
param is just a simple string/int. True in most cases though.

Note that this method is used, often by common LSM modules, for opening
and handling files from kernel space. (think persistent labeling on a
generic filesystem).

>
> > Removing this symbol will not really get in the way for the bad guys
> > because it'll always be possible to find and intercept it anyway (see my
> > previous post in this thread), but it'll increase the learning curve for
> > kernel newbies. Do we really want that ?
>
> Hear hear.

;-)

Yoav Weiss