[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#336220: xdm: bogus /dev/mem access lead to trouble on arm platforms



On Fri, Oct 28, 2005 at 07:47:14PM +0200, Lennert Buytenhek wrote:
> On arm platforms where physical RAM doesn't start at physical address
> zero, opening /dev/mem and reading from it causes a kernel oops.  This
> is arguably a kernel bug, but it's still not a very good idea to just
> start randomly poking around in /dev/mem in search of entropy, which is
> what xdm does if it can't get entropy elsewhere.
> 
> (When the kernel is fixed, blindly reading from /dev/mem will simply
> just fail with EFAULT instead of oopsing.  If that will cause xdm to
> fail, it should really just fail right away if /dev/random doesn't work.)

xdm seems to try /dev/urandom first nowadays (before /dev/random and then
/dev/mem). I don't whether arm systems have a /dev/urandom, but it seems
more likely than having a /dev/random.

I don't know which version of xdm you were running when you reported this
problem (Xorg 6.8.2 was the latest release on 2005/10/28). But it was at
the same time that the urandom support has been added upstream (in Xorg
6.9.99.902 on 2005/10/29).

So please test with a more recent xdm and report back whether it helps.

Thanks
Brice



Reply to: