All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Ashwin Dayanand Kamat <ashwin.kamat@broadcom.com>
Cc: stable@vger.kernel.org, axboe@kernel.dk,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	ajay.kaher@broadcom.com, alexey.makhalov@broadcom.com,
	vasavi.sirnapalli@broadcom.com, Min Li <min15.li@samsung.com>,
	Damien Le Moal <dlemoal@kernel.org>,
	Chaitanya Kulkarni <kch@nvidia.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v5.10] block: add check that partition length needs to be aligned with block size
Date: Fri, 5 Apr 2024 11:31:45 +0200	[thread overview]
Message-ID: <2024040539-bonsai-nugget-9e60@gregkh> (raw)
In-Reply-To: <20240402084955.82273-1-ashwin.kamat@broadcom.com>

On Tue, Apr 02, 2024 at 02:19:55PM +0530, Ashwin Dayanand Kamat wrote:
> From: Min Li <min15.li@samsung.com>
> 
> [ Upstream commit 6f64f866aa1ae6975c95d805ed51d7e9433a0016]
> 
> Before calling add partition or resize partition, there is no check
> on whether the length is aligned with the logical block size.
> If the logical block size of the disk is larger than 512 bytes,
> then the partition size maybe not the multiple of the logical block size,
> and when the last sector is read, bio_truncate() will adjust the bio size,
> resulting in an IO error if the size of the read command is smaller than
> the logical block size.If integrity data is supported, this will also
> result in a null pointer dereference when calling bio_integrity_free.
> 
> Cc:  <stable@vger.kernel.org>
> Signed-off-by: Min Li <min15.li@samsung.com>
> Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Link: https://lore.kernel.org/r/20230629142517.121241-1-min15.li@samsung.com
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> Signed-off-by: Ashwin Dayanand Kamat <ashwin.kamat@broadcom.com>
> ---
>  block/ioctl.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)

Now queued up,t hanks.,

greg k-h

      reply	other threads:[~2024-04-05  9:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02  8:49 [PATCH v5.10] block: add check that partition length needs to be aligned with block size Ashwin Dayanand Kamat
2024-04-05  9:31 ` Greg KH [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=2024040539-bonsai-nugget-9e60@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=ajay.kaher@broadcom.com \
    --cc=alexey.makhalov@broadcom.com \
    --cc=ashwin.kamat@broadcom.com \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=hch@lst.de \
    --cc=kch@nvidia.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=min15.li@samsung.com \
    --cc=stable@vger.kernel.org \
    --cc=vasavi.sirnapalli@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.