From: David Laight <David.Laight@ACULAB.COM>
To: 'Michael Schmitz' <schmitzmic@gmail.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Subject: RE: [PATCH 5.4.y] block: add overflow checks for Amiga partition support
Date: Mon, 17 Jul 2023 08:00:42 +0000 [thread overview]
Message-ID: <cbdb7cde68dc4d239861a631436dc01d@AcuMS.aculab.com> (raw)
In-Reply-To: <20230715232656.8632-1-schmitzmic@gmail.com>
From: Michael Schmitz
> Sent: 16 July 2023 00:27
>
> The Amiga partition parser module uses signed int for partition sector
> address and count, which will overflow for disks larger than 1 TB.
>
> Use u64 as type for sector address and size to allow using disks up to
> 2 TB without LBD support, and disks larger than 2 TB with LBD. The RBD
> format allows to specify disk sizes up to 2^128 bytes (though native
> OS limitations reduce this somewhat, to max 2^68 bytes),
Pretty much everything (including the mass of an proton) stops
you having a disk with anywhere near 2^64 bytes in it.
David
> so check for
> u64 overflow carefully to protect against overflowing sector_t.
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2023-07-17 8:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 20:30 FAILED: patch "[PATCH] block: add overflow checks for Amiga partition support" failed to apply to 5.4-stable tree gregkh
2023-07-15 23:26 ` [PATCH 5.4.y] block: add overflow checks for Amiga partition support Michael Schmitz
2023-07-17 8:00 ` David Laight [this message]
2023-07-17 22:17 ` Michael Schmitz
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=cbdb7cde68dc4d239861a631436dc01d@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=axboe@kernel.dk \
--cc=schmitzmic@gmail.com \
--cc=stable@vger.kernel.org \
/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