[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] avoid UB in guest handle arithmetic
- To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
- Date: Fri, 22 Mar 2024 09:39:26 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0eoeqtHK5q+bZJQf+Nm+h9g5s48iuQ5hpi1d5iFOztc=; b=I8QzYgMZ7Yx0a7o5KUy7GbbvoVvd9u60/QsrMrTVQtN4d2aiFd57eMx5m0C8+bQ3o/qmTFN+27CQ8h8NPAZvYqM1Q5pVU017VLQK1rw96sN3cqYi/+lpCHPNadtwT7dGBcFc1tPQCR/nRWKz1Mjay8ulz0s4zlJ11X7nsFu5U+sLYF6PVPZbe4CiZhMUHIma1ucpY8qSnQvxEeI+vY5xbRQeLdwUKcQCK0BlMHmT6Ru+3nbs80D/XT09+pjSwacVcfBYrFQLVBV4MxVQoJKjbXnUtqKMlVJYNmPbOkWVSX/xpQiRwtrb/UPWAKPKtI0EkIGGgc8Zm6GsD7lr0/9V+A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FD4dzQOFCViWizcL+DsaS8o+PnbQ9XvFB1grJQbrPBYEP4EX23+6K6AgnTvqEI/Z4L5QDPQ9Sg7V46WG5i598YuvFJxbrIYbPCmt+WBvaNQv5cxbQXfjSIb67FAI9ld9PBRRwCpT5XzMnvDFZ1rgwYcZhl2bbAZO4rbB1wdBDcX0oh770Ojy1MtDP1NuQFFEXgsQS9rgE2mNg3UBWebtEpUkPDzSEsV/Xav3M77wzp3Yy/Mil7ofj8MBFofyxW4RCOx43DXdwD21yEZYuj9dMacmGRbJ/RV6FUurWzx47Z5IXcObqD6MygKbGytoUInDVYKxAIm8D9Ww5kZzRkVvmg==
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Fri, 22 Mar 2024 13:39:49 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 3/19/24 09:26, Jan Beulich wrote:
> At least XENMEM_memory_exchange can have huge values passed in the
> nr_extents and nr_exchanged fields. Adding such values to pointers can
> overflow, resulting in UB. Cast respective pointers to "unsigned long"
Why not uintptr_t?
|