All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aleksei Vetrov <vvvvvv@google.com>
To: Xiaosen He <quic_xiaosenh@quicinc.com>
Cc: James.Bottomley@hansenpartnership.com,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	quic_jianzhou@quicinc.com, quic_cang@quicinc.com
Subject: Re: [PATCH v3] scsi: use unsigned int variables to parse partition table
Date: Fri, 15 Nov 2024 14:58:39 +0000	[thread overview]
Message-ID: <Zzdhn7aIR250WgVr@google.com> (raw)
In-Reply-To: <20241115030303.2473414-1-quic_xiaosenh@quicinc.com>

On Thu, Nov 14, 2024 at 07:03:03PM -0800, Xiaosen He wrote:
> signed integer overflow happened in the following multiplication,
> ext_cyl*(end_head+1)*end_sector = 0x41040*(0xff+1)*0x3f = 0xffffc000,
> the overflow was caught by UBSAN and caused crash to the system,
> use unsigned int instead of signed int to avoid integer overflow.
> 
> Signed-off-by: Xiaosen He <quic_xiaosenh@quicinc.com>
> Signed-off-by: Jian Zhou <quic_jianzhou@quicinc.com>
Reviewed-by: Aleksei Vetrov <vvvvvv@google.com>


  reply	other threads:[~2024-11-15 14:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-15  3:03 [PATCH v3] scsi: use unsigned int variables to parse partition table Xiaosen He
2024-11-15 14:58 ` Aleksei Vetrov [this message]
2025-01-10 22:38 ` Martin K. Petersen

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=Zzdhn7aIR250WgVr@google.com \
    --to=vvvvvv@google.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=quic_cang@quicinc.com \
    --cc=quic_jianzhou@quicinc.com \
    --cc=quic_xiaosenh@quicinc.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.