Re: (harmless?) race in module loading.

Chris Wedgwood (chris@cybernet.co.nz)
Tue, 19 May 1998 12:49:56 +1200


> Upon further investigation, it's fairly easy to trigger it - if a process
> attempts to access the device, causing a modprobe, and a second process
> attempts to open the device before the first modprobe has finished, then a
> second one will be forked.

main()
{
fork();
open("/dev/ttyS0",0);
}

will trigger this.

> Does this matter?

I'm basically of the opinion that anyone who can cause a module to be loaded
should be considered to have some kind of trust anyhow... this means if you
use serial ports as a module, then anything that can open these devices
should be considered special so some extent.

-Chris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu