mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Deepanshu Kartikey <kartikey406@gmail.com>
Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
	 syzbot+f99b00a963915b6b52c6@syzkaller.appspotmail.com
Subject: Re: [PATCH] io_uring/memmap: bound io_pin_pages() by page array byte size
Date: Mon, 22 Jun 2026 15:14:50 -0600	[thread overview]
Message-ID: <178216289049.99876.2987989144128669864.b4-ty@b4> (raw)
In-Reply-To: <20260621012933.50571-1-kartikey406@gmail.com>


On Sun, 21 Jun 2026 06:59:33 +0530, Deepanshu Kartikey wrote:
> io_pin_pages() checks that nr_pages does not exceed INT_MAX, then
> allocates a struct page * array of nr_pages entries. kvmalloc() limits
> allocations to INT_MAX bytes, but the check counts pages, not bytes.
> On 64-bit each entry is 8 bytes, so the array hits the INT_MAX byte
> limit at INT_MAX / sizeof(struct page *) pages, well before the page
> count check fires.
> 
> [...]

Applied, thanks!

[1/1] io_uring/memmap: bound io_pin_pages() by page array byte size
      commit: 3996771b8f759729cba0a28007438c085f814d61

Best regards,
-- 
Jens Axboe




      parent reply	other threads:[~2026-06-22 21:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-21  1:29 Deepanshu Kartikey
2026-06-22 14:11 ` Gabriel Krisman Bertazi
2026-06-22 21:14 ` Jens Axboe [this message]

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=178216289049.99876.2987989144128669864.b4-ty@b4 \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=kartikey406@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+f99b00a963915b6b52c6@syzkaller.appspotmail.com \
    /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

all inboxes | Powered by JetHome®