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: <aLnbXSxyzhGYGjks@google.com>
Date: Thu, 4 Sep 2025 18:33:01 +0000
From: Roman Gushchin <roman.gushchin@...ux.dev>
To: Stanislav Fort <stanislav.fort@...le.com>
Cc: linux-mm@...ck.org, cgroups@...r.kernel.org,
	linux-kernel@...r.kernel.org, hannes@...xchg.org, mhocko@...nel.org,
	shakeel.butt@...ux.dev, muchun.song@...ux.dev,
	akpm@...ux-foundation.org, stable@...r.kernel.org,
	Stanislav Fort <disclosure@...le.com>
Subject: Re: [PATCH] mm/memcg: v1: account event registrations and drop
 world-writable cgroup.event_control

On Thu, Sep 04, 2025 at 09:12:48PM +0300, Stanislav Fort wrote:
> In cgroup v1, the legacy cgroup.event_control file is world-writable and allows unprivileged users to register unbounded events and thresholds. Each registration allocates kernel memory without capping or memcg charging, which can be abused to exhaust kernel memory in affected configurations.
> 
> Make the following minimal changes:
> - Account allocations with __GFP_ACCOUNT in event and threshold registration.
> - Remove CFTYPE_WORLD_WRITABLE from cgroup.event_control to make it owner-writable.
> 
> This does not affect cgroup v2. Allocations are still subject to kmem accounting being enabled, but this reduces unbounded global growth.
> 
> Reported-by: Stanislav Fort <disclosure@...le.com>
> Acked-by: Johannes Weiner <hannes@...xchg.org>
> Cc: stable@...r.kernel.org
> Signed-off-by: Stanislav Fort <disclosure@...le.com>

Acked-by: Roman Gushchin <roman.gushchin@...ux.dev>

Small nit: please, use GFP_KERNEL_ACCOUNT instead of
GFP_KERNEL | __GFP_ACCOUNT.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ