linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yosry Ahmed <yosryahmed@google.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Nhat Pham <nphamcs@gmail.com>,  Minchan Kim <minchan@kernel.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	 linux-mm <linux-mm@kvack.org>
Subject: Re: [mm/page_alloc or mm/vmscan or mm/zswap] use-after-free in obj_malloc()
Date: Thu, 22 Feb 2024 18:27:22 -0800	[thread overview]
Message-ID: <CAJD7tkZZ+eU0M9GPcWmx2NmxRuJ0ZN9yM=Yi2URUaAxUd-YUcg@mail.gmail.com> (raw)
In-Reply-To: <d041ca52-8e0b-48b3-9606-314ac2a53408@I-love.SAKURA.ne.jp>

On Thu, Feb 22, 2024 at 6:10 PM Tetsuo Handa
<penguin-kernel@i-love.sakura.ne.jp> wrote:
>
> I can observe this bug during evict_folios() from 6.7.0 to 6.8.0-rc5-00163-gffd2cb6b718e.
> Since I haven't observed with 6.6.0, this bug might be introduced in 6.7 cycle.

I am not familiar with KMSAN bug reports, but it seems like it's
reporting a user-after-free for zspage->freeobj. The report says it
was created in free_unref_page_prepare() during lruvec reclaim, and I
am not sure how that's possible given that zspage is allocated from
the slab allocator. Perhaps I am mis-interpreting the report.

I also don't see any recent changes in mm/zsmalloc.c that modify this
code, so maybe it wasn't introduce in 6.7. I will defer to Minchan and
Sergey, I don't think zswap is an active actor in this bug report.


  reply	other threads:[~2024-02-23  2:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23  2:10 [mm/page_alloc or mm/vmscan or mm/zswap] use-after-free in obj_malloc() Tetsuo Handa
2024-02-23  2:27 ` Yosry Ahmed [this message]
2024-02-23  4:48   ` Sergey Senozhatsky
2024-02-23  4:50     ` Yosry Ahmed
2024-02-23  4:56       ` Sergey Senozhatsky
2024-02-23  4:58         ` Sergey Senozhatsky
2024-02-23  5:05           ` Yosry Ahmed
2024-02-23  5:19             ` Sergey Senozhatsky
2024-02-23  5:23     ` Chengming Zhou
2024-02-23  5:29       ` Sergey Senozhatsky
2024-02-23  9:26       ` Tetsuo Handa
2024-02-23 10:10         ` Chengming Zhou
2024-02-23  4:43 ` Sergey Senozhatsky
2024-02-23 15:22   ` Tetsuo Handa
2024-02-23 23:54     ` [PATCH] x86: disable non-instrumented version of copy_page when KMSAN is enabled Tetsuo Handa
2024-02-24  6:27       ` [PATCH v2] " Tetsuo Handa
2024-02-24 14:23     ` [mm/page_alloc or mm/vmscan or mm/zswap] use-after-free in obj_malloc() Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJD7tkZZ+eU0M9GPcWmx2NmxRuJ0ZN9yM=Yi2URUaAxUd-YUcg@mail.gmail.com' \
    --to=yosryahmed@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=nphamcs@gmail.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).