|
From: | Тигран Согомонян |
Subject: | Re: [PATCH] hw/misc: cast nand_getio value to uint64_t |
Date: | Fri, 27 Dec 2024 13:55:28 +0300 |
User-agent: | RuPost Desktop |
27/12/24 01:49, Alex Bennée пишет:
Yes, I saw that upstream master doesn't have this code, but some users use stable-9.1. I suggest adding these changes not to the main branch, but to the stable-9.1 branch.Tigran Sogomonian <tsogomonian@astralinux.ru> writes:s->buswidth = nand_flash_ids[s->chip_id].width >> 3; <= 16 >> 3 <= 2. x <= s->ioaddr[offset] << (s->buswidth << 3) <= max_uint8_t << 16 With x << 24 overflow is possible. Other cases are similar. Thus, need to cast return value to uint64_t. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Tigran Sogomonian <tsogomonian@astralinux.ru>This code was removed in 192f75ad11 (hw/misc: Remove omap_gpmc)
[Prev in Thread] | Current Thread | [Next in Thread] |