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] [day] [month] [year] [list]
Message-ID: <20161222085637.GB3494@esperanza>
Date:   Thu, 22 Dec 2016 11:56:37 +0300
From:   Vladimir Davydov <vdavydov@...antool.org>
To:     Greg Thelen <gthelen@...gle.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Alexander Potapenko <glider@...gle.com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Christoph Lameter <cl@...ux.com>,
        Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        kasan-dev@...glegroups.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] kasan: add memcg kmem_cache test

On Tue, Dec 20, 2016 at 10:11:02AM -0800, Greg Thelen wrote:
> Make a kasan test which uses a SLAB_ACCOUNT slab cache.  If the test is
> run within a non default memcg, then it uncovers the bug fixed by
> "kasan: drain quarantine of memcg slab objects"[1].
> 
> If run without fix [1] it shows "Slab cache still has objects", and the
> kmem_cache structure is leaked.
> Here's an unpatched kernel test:
> $ dmesg -c > /dev/null
> $ mkdir /sys/fs/cgroup/memory/test
> $ echo $$ > /sys/fs/cgroup/memory/test/tasks
> $ modprobe test_kasan 2> /dev/null
> $ dmesg | grep -B1 still
> [ 123.456789] kasan test: memcg_accounted_kmem_cache allocate memcg accounted object
> [ 124.456789] kmem_cache_destroy test_cache: Slab cache still has objects
> 
> Kernels with fix [1] don't have the "Slab cache still has objects"
> warning or the underlying leak.
> 
> The new test runs and passes in the default (root) memcg, though in the
> root memcg it won't uncover the problem fixed by [1].
> 
> Signed-off-by: Greg Thelen <gthelen@...gle.com>

Reviewed-by: Vladimir Davydov <vdavydov.dev@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ