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:	Fri, 11 Sep 2009 12:16:58 +0100
From:	Catalin Marinas <catalin.marinas@....com>
To:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc:	rusty@...tcorp.com.au, linux-kernel@...r.kernel.org
Subject: Re: [2.6.31] Memory leak in load_module()?

On Fri, 2009-09-11 at 19:58 +0900, Tetsuo Handa wrote:
> OK. Here is the output with CONFIG_FRAME_POINTER=y .
> Do I need to enable some other debug options?
> 
> unreferenced object 0xdd7c1718 (size 32):
>   comm "insmod", pid 2859, jiffies 4294757534
>   backtrace:
>     [<c048a210>] create_object+0x135/0x202
>     [<c048a302>] kmemleak_alloc+0x25/0x49
>     [<c04865bd>] kmemleak_alloc_recursive+0x1c/0x22
>     [<c0486e27>] __kmalloc_track_caller+0x66/0xb3
>     [<c0473980>] kstrdup+0x2c/0x4e
>     [<c044716a>] setup_modinfo_srcversion+0x12/0x1b
>     [<c0448725>] load_module+0x866/0x124a
>     [<c0449180>] sys_init_module+0x49/0x1b9
>     [<c0402a24>] sysenter_do_call+0x12/0x22
>     [<ffffffff>] 0xffffffff

The object above was allocated by kstrdup via setup_modinfo_srcversion
but the module loading failed and no other kernel part freed the
mod->filed object. I think it's a real leak but you could try a few
"echo scan" to make sure it's not just a temporary false positive.

(the kmemleak branch on git://linux-arm.org/linux-2.6.git has a patch
which dumps the first few bytes from the object and sometimes this
helps; I'll send a pull request to Linus sometime today)

-- 
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