Re: [PATCH] LSM: add static to security_ops variable
From: wzt wzt
Date: Fri Feb 19 2010 - 06:58:02 EST
Maybe, but The attackers will use a complicated way to find the
security_ops address, it's a barrier to attackers. LSM is security
framework, we don't want the attackers can easily to break it. Just
like the sys_call_table variable in kernel 2.4.x(global and
writeable), evil drivers can extern the variable, then replace the
Sys_X functions.
On Fri, Feb 19, 2010 at 7:44 PM, Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:
> On Sun, Feb 7, 2010 at 1:24 PM, wzt wzt <wzt.wzt@xxxxxxxxx> wrote:
>> security_ops was declared as a global variable, so other drivers or
>> kernel code can easily change its value, like:
>
> With your patch they still can.
>
>> extern struct security_operations *security_ops;
>> security_ops = NULL;
>>
>> then insmod this driver immediately, it will get an oops. ÂOther evil
>> drivers can aslo fake this variable as extern.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/