public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Re: Local root exploit with kmod and modutils > 2.1.121
@ 2000-11-16 21:21 Xavier Bestel
  2000-11-16 22:00 ` Keith Owens
  0 siblings, 1 reply; 4+ messages in thread
From: Xavier Bestel @ 2000-11-16 21:21 UTC (permalink / raw)
  To: Linux Kernel

Hi,

as modprobe (insmod) args parsing seems POSIX compliant, we should put a
"--" before
what should be interpreted only as a textual argument, not as an option.
This is a lot safer: whatever is passed, modprobe will take it as a module
name.

--- linux-2.4.0-test10/kernel/kmod.c    Tue Sep 26 01:18:55 2000
+++ linux/kernel/kmod.c Thu Nov 16 19:57:45 2000
@@ -133,7 +133,7 @@
 static int exec_modprobe(void * module_name)
 {
        static char * envp[] = { "HOME=/", "TERM=linux",
"PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
-       char *argv[] = { modprobe_path, "-s", "-k", (char*)module_name,
NULL };
+       char *argv[] = { modprobe_path, "-s", "-k", "--",
(char*)module_name, NULL };
        int ret;

        ret = exec_usermodehelper(modprobe_path, argv, envp);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: Local root exploit with kmod and modutils > 2.1.121
@ 2000-11-16 18:56 kuznet
  2000-11-16 19:08 ` [PATCH] " Xavier Bestel
  0 siblings, 1 reply; 4+ messages in thread
From: kuznet @ 2000-11-16 18:56 UTC (permalink / raw)
  To: Alan Cox; +Cc: alan, linux-kernel

Hello!

> > It means that test for CAP_SYS_MODULE is illegal, moving pure policy
> > issue to improper place.
> 
> Definitely not so
> 
> What matters is whether the user is requesting a module or the kernel is 
> choosing to load a module. In the former case where the user can influence the
> module name then you need to check CAP_SYS_MODULE in the latter you do not
> care.

Alan, I honestly peered to this paragraph of text for 10 minutes. 8)8)

It is funny, but I managed to compile it only as:
"dev_load(i.e. you) need not take of care of this".

I.e. exactly the thing which I said. 8)

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-11-16 22:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-16 21:21 [PATCH] Re: Local root exploit with kmod and modutils > 2.1.121 Xavier Bestel
2000-11-16 22:00 ` Keith Owens
2000-11-16 22:18   ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2000-11-16 18:56 kuznet
2000-11-16 19:08 ` [PATCH] " Xavier Bestel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox