lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Jan 2012 14:00:58 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	Dirk Gouders <gouders@...bocholt.fh-gelsenkirchen.de>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [Problem] kernel hangs at boot (bisected 892d208bcf)

On Thu, Jan 19, 2012 at 12:16:56PM +0000, Dirk Gouders wrote:
> Catalin Marinas <catalin.marinas@....com> writes:
> > On Wed, Jan 18, 2012 at 07:32:59PM +0000, Dirk Gouders wrote:
> >> Freeing unused kernel memory: 608k freed
> >> kernel tried to execute NX-protected page - exploit attempt? (uid: 0)
> >> BUG: unable to handle kernel paging request at ffffffff818b232b
> >> IP: [<ffffffff818b232b>] kmemleak_late_init+0x8a/0x8a
...
> >> Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc <cc> cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc
> >> RIP  [<ffffffff818b232b>] kmemleak_late_init+0x8a/0x8a
> >
> > I don't really see how kmemleak could cause such error (or any of the
> > recent changes I have made). It looks like some of the code in the
> > .init.text section is not executable.

Ah, the interesting part - 0xcc is the poison value for freed initmem.
And from the kernel logs you posted Linux frees the initmem and later
calls kmemleak_late_init() which should have been in the .init.text
section.

The kmemleak_late_init() function is defined as:

static int __init kmemleak_late_init(void)
{
...
}
late_initcall(kmemleak_late_init);

and it must *not* be called after the initmem has been freed. Was there
any change in the x86 or generic code with regards to the freeing of the
init memory?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ