From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Xiaosen He <quic_xiaosenh@quicinc.com>
Cc: James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
vvvvvv@google.com, quic_jianzhou@quicinc.com,
quic_cang@quicinc.com
Subject: Re: [PATCH v3] scsi: use unsigned int variables to parse partition table
Date: Fri, 10 Jan 2025 17:38:47 -0500 [thread overview]
Message-ID: <yq1v7um47qo.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20241115030303.2473414-1-quic_xiaosenh@quicinc.com> (Xiaosen He's message of "Thu, 14 Nov 2024 19:03:03 -0800")
Xiaosen,
> 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.
This patch is against a very old kernel. Please see commit a10183d744fb
("scsi: simplify scsi_partsize") which was merged back in 2020.
--
Martin K. Petersen Oracle Linux Engineering
prev parent reply other threads:[~2025-01-10 22:38 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
2025-01-10 22:38 ` Martin K. Petersen [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=yq1v7um47qo.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=quic_cang@quicinc.com \
--cc=quic_jianzhou@quicinc.com \
--cc=quic_xiaosenh@quicinc.com \
--cc=vvvvvv@google.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.