[Crash-utility] Re: Turn CONFIG_STRICT_DEVMEM in sysctl dev.mem.restricted

Bernhard Walle bwalle at suse.de
Sun Nov 16 15:20:03 UTC 2008


* Alan Cox [2008-11-16 15:07]:
>
> > The protection in the general case and the ability to do live debugging.
> 
> What protection. You've completely failed to explain or provide a single
> example of any protection provided by the STRICT_DEVMEM code.

I don't need to explain what protection STRICT_DEVMEM provides, just
because I didn't submit STRICT_DEVMEM. However:

    Author: Arjan van de Ven <arjan at linux.intel.com>
    Date:   Thu Apr 24 23:40:47 2008 +0200

    The X server needs access to /dev/mem for the PCI space, but it doesn't need
    access to memory; both the file permissions and SELinux permissions of /dev/mem
    just make X effectively super-super powerful. With the exception of the
    BIOS area, there's just no valid app that uses /dev/mem on actual memory.
    Other popular users of /dev/mem are rootkits and the like.
    (note: mmap access of memory via /dev/mem was already not allowed since
    a really long time)

So without that patch, a distributor needs to have two kernels: One
with SELinux and with /dev/mem protection and one without it. If I
remember correctly, you can turn off SELinux on the boot command line.
But I never used it. At least I don't see -selinux and -noselinux
kernels in Redhat.

However, with my patch you can make everything configurable. With
SELinux or Apparmor you can also protect the user from writing that
sysctl. Or from loading kernel modules that circumvent that protection.



Regards,
Bernhard




More information about the Crash-utility mailing list