From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Deepanshu Kartikey <kartikey406@gmail.com>
Cc: axboe@kernel.dk, martin.petersen@oracle.com, stefanha@redhat.com,
hare@suse.de, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org,
syzbot+660d079d90f8a1baf54d@syzkaller.appspotmail.com
Subject: Re: [PATCH v3] block: add allocation size check in blkdev_pr_read_keys()
Date: Wed, 17 Dec 2025 09:12:23 -0500 [thread overview]
Message-ID: <yq1ike542t5.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20251217014712.35771-1-kartikey406@gmail.com> (Deepanshu Kartikey's message of "Wed, 17 Dec 2025 07:17:12 +0530")
Deepanshu,
> blkdev_pr_read_keys() takes num_keys from userspace and uses it to
> calculate the allocation size for keys_info via struct_size(). While
> there is a check for SIZE_MAX (integer overflow), there is no upper
> bound validation on the allocation size itself.
LGTM.
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
--
Martin K. Petersen
next prev parent reply other threads:[~2025-12-17 14:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 1:47 [PATCH v3] block: add allocation size check in blkdev_pr_read_keys() Deepanshu Kartikey
2025-12-17 14:05 ` Stefan Hajnoczi
2025-12-17 14:12 ` Martin K. Petersen [this message]
2025-12-17 14:36 ` Jens Axboe
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=yq1ike542t5.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=kartikey406@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stefanha@redhat.com \
--cc=syzbot+660d079d90f8a1baf54d@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