[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] ide: atapi: check logical block address and read size (CV
From: |
P J P |
Subject: |
Re: [PATCH v2] ide: atapi: check logical block address and read size (CVE-2020-29443) |
Date: |
Mon, 18 Jan 2021 18:36:31 +0530 (IST) |
+-- On Mon, 18 Jan 2021, Paolo Bonzini wrote --+
| On 18/01/21 13:29, P J P wrote:
| > + s->nb_sectors = nb_sectors & (uint64_t)INT_MAX << 2;
| > if (kind == IDE_CD) {
| > + s->nb_sectors &= (uint64_t)INT_MAX << 2;
|
| Not an &, but rather a MIN.
|
| There is also ide_resize_cb, so perhaps a new function ide_set_nb_sectors in
| hw/ide/core.c would be better.
|
| ... it doesn't hurt either to have INT_MAX << 2.
Okay, will do.
Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
8685 545E B54C 486B C6EB 271E E285 8B5A F050 DE8D
Re: [PATCH v2] ide: atapi: check logical block address and read size (CVE-2020-29443), Philippe Mathieu-Daudé, 2021/01/18