All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: "Denis V. Lunev" <den@openvz.org>, svt-core@virtuozzo.com
Cc: andrey.drobyshev@virtuozzo.com, den@openvz.org
Subject: Re: [PATCH hci-dev 1/1] hw/ide/atapi: fix abort on CD-ROM reads past LBA 2^31 #VSTOR-154795
Date: Thu, 12 Nov 2026 13:51:27 +0000	[thread overview]
Message-ID: <010701a1d00715db-79285f5c-ce4a-4f48-bff2-eabe308e609c-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261112134758.646697-2-den@openvz.org>

> From: Denis V. Lunev <den@openvz.org>
> 
> cmd_read() and cmd_read_cd() check the 32-bit LBA from the CDB against
> the medium size, then pass it to ide_atapi_cmd_read() as an int. On a
> medium larger than 4 TiB, a read at LBA 2^31 or above passes the range
> check, turns negative and trips the assertion:
> 
>   hw/ide/atapi.c:315: ide_atapi_cmd_read_pio: Assertion
>   `0 <= lba && lba < (s->nb_sectors >> 2)' failed.
> 
> Reading the last sector is enough, e.g. a UDF anchor probe, so the
> guest aborts QEMU just by looking at the disc.
> 
> Pass the LBA as uint32_t, which is what the CDB carries, and widen
> IDEState.lba to int64_t so it holds every valid LBA and keeps -1 as
> the "not a sector read" marker. The field is not migrated.
> 
> Fixes: b8d7f1bc5927 ("ide: atapi: check logical block address and read size (CVE-2020-29443)")
> Signed-off-by: Denis V. Lunev <den@openvz.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261112134758.646697-1-den@openvz.org?part=1


  reply	other threads:[~2026-11-12 13:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 13:47 [PATCH hci-dev 0/1] " Denis V. Lunev
2026-11-12 13:47 ` [PATCH hci-dev 1/1] " Denis V. Lunev
2026-11-12 13:51   ` no-reply [this message]
2026-11-12 17:12   ` Andrey Drobyshev

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=010701a1d00715db-79285f5c-ce4a-4f48-bff2-eabe308e609c-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=andrey.drobyshev@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=svt-core@virtuozzo.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.