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: <20250611171950.5cb2d563c2935a93f5c7bbc0@linux-foundation.org>
Date: Wed, 11 Jun 2025 17:19:50 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Kairui Song <ryncsn@...il.com>
Cc: Chris Li <chrisl@...nel.org>, linux-mm@...ck.org, Barry Song
 <21cnbao@...il.com>, Peter Xu <peterx@...hat.com>, Suren Baghdasaryan
 <surenb@...gle.com>, Andrea Arcangeli <aarcange@...hat.com>, David
 Hildenbrand <david@...hat.com>, Lokesh Gidra <lokeshgidra@...gle.com>,
 stable@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4] mm: userfaultfd: fix race of userfaultfd_move and
 swap cache

On Wed, 11 Jun 2025 13:16:25 +0800 Kairui Song <ryncsn@...il.com> wrote:

> This commit fixes two kinds of races, they may have different results:
> 
> Barry reported a BUG_ON in commit c50f8e6053b0, we may see the same
> BUG_ON if the filemap lookup returned NULL and folio is added to swap
> cache after that.
> 
> If another kind of race is triggered (folio changed after lookup) we
> may see RSS counter is corrupted:
> 
> [  406.893936] BUG: Bad rss-counter state mm:ffff0000c5a9ddc0
> type:MM_ANONPAGES val:-1
> [  406.894071] BUG: Bad rss-counter state mm:ffff0000c5a9ddc0
> type:MM_SHMEMPAGES val:1
> 
> Because the folio is being accounted to the wrong VMA.
> 
> I'm not sure if there will be any data corruption though, seems no.
> The issues above are critical already.

Thanks, I pasted this into the patch's changelog.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ