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: <Yjg+hVuJBPGhkfeJ@dhcp22.suse.cz>
Date:   Mon, 21 Mar 2022 09:59:49 +0100
From:   Michal Hocko <mhocko@...e.com>
To:     Miaohe Lin <linmiaohe@...wei.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        kosaki.motohiro@...fujitsu.com, mgorman@...e.de,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/mempolicy: fix potential mpol_new leak in
 shared_policy_replace

On Sat 19-03-22 18:42:33, Miaohe Lin wrote:
[...]
> This would be triggered easily with below code snippet in my virtual machine:
> 
> 	shmid = shmget((key_t)5566, 1024 * PAGE_SIZE, 0666|IPC_CREAT);
> 	shm = shmat(shmid, 0, 0);
> 	loop {
> 		mbind(shm, 1024 * PAGE_SIZE, MPOL_LOCAL, mask, maxnode, 0);
> 		mbind(shm + 128 * PAGE_SIZE, 128 * PAGE_SIZE, MPOL_DEFAULT, mask, maxnode, 0);
> 	}
> 
> If there're many process doing the above work, mpol_new will be leaked easily.
> So should I resend this patch with Cc stable? But it seems I'am not supposed
> to make this decision and the maintainer will take care of this?

I would just add
Fixes: 42288fe366c4 ("mm: mempolicy: Convert shared_policy mutex to spinlock")
Cc: stable # 3.8

And also add your above reproducer snippet added to the original changelog.
This would be more then enough to conclude the importance.

Thank you for working hard on this!
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ