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]
Message-ID: <20190109113126.nzpmb7xx4xqtn37w@mbp>
Date:   Wed, 9 Jan 2019 11:31:26 +0000
From:   Catalin Marinas <catalin.marinas@....com>
To:     Prateek Patel <prpatel@...dia.com>
Cc:     paul@...l-moore.com, sds@...ho.nsa.gov, eparis@...isplace.org,
        linux-kernel@...r.kernel.org, selinux@...r.kernel.org,
        linux-tegra@...r.kernel.org, talho@...dia.com, swarren@...dia.com,
        linux-mm@...ck.org, snikam@...dia.com, vdumpa@...dia.com,
        Sri Krishna chowdary <schowdary@...dia.com>
Subject: Re: [PATCH] selinux: avc: mark avc node as not a leak

Hi Prateek,

On Wed, Jan 09, 2019 at 02:09:22PM +0530, Prateek Patel wrote:
> From: Sri Krishna chowdary <schowdary@...dia.com>
> 
> kmemleak detects allocated objects as leaks if not accessed for
> default scan time. The memory allocated using avc_alloc_node
> is freed using rcu mechanism when nodes are reclaimed or on
> avc_flush. So, there is no real leak here and kmemleak_scan
> detects it as a leak which is false positive. Hence, mark it as
> kmemleak_not_leak.

In theory, kmemleak should detect the node->rhead in the lists used by
call_rcu() and not report it as a leak. Which RCU options do you have
enabled (just to check whether kmemleak tracks the RCU internal lists)?

Also, does this leak eventually disappear without your patch? Does

  echo dump=0xffffffc0dd1a0e60 > /sys/kernel/debug/kmemleak

still display this object?

Thanks.

-- 
Catalin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ