qemu-cr16/hw/sd
Jan Kiszka 99282a805c hw/sd/sdcard: Avoid confusing address calculation in rpmb_calc_hmac
From the source frame, we initially need to copy out all fields after
data, thus starting from nonce on. Avoid expressing this indirectly by
pointing to the end of the data field - which also raised the attention
of Coverity (out-of-bound read /wrt data).

Resolves: CID 1642869
Reported-by: GuoHan Zhao <zhaoguohan@kylinos.cn>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <4f7e1952-ecbd-4484-b128-9d02de3a7935@siemens.com>
[PMD: Add comment before the memcpy() call]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-11-18 19:59:36 +01:00
..
allwinner-sdhost.c hw/sd/sdbus: Provide buffer size to sdbus_do_command() 2025-08-05 16:05:56 +02:00
aspeed_sdhci.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
bcm2835_sdhost.c hw/sd/sdbus: Provide buffer size to sdbus_do_command() 2025-08-05 16:05:56 +02:00
cadence_sdhci.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
core.c hw/sd/sdbus: Provide buffer size to sdbus_do_command() 2025-08-05 16:05:56 +02:00
Kconfig hw/sd: Add Cadence SDHCI emulation 2020-09-09 15:54:18 -07:00
meson.build hw/sd: Remove pxa2xx_mmci.c 2024-10-01 14:25:29 +01:00
npcm7xx_sdhci.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
omap_mmc.c hw/sd/sdbus: Provide buffer size to sdbus_do_command() 2025-08-05 16:05:56 +02:00
pl181.c hw/sd/sdbus: Provide buffer size to sdbus_do_command() 2025-08-05 16:05:56 +02:00
sd.c hw/sd/sdcard: Avoid confusing address calculation in rpmb_calc_hmac 2025-11-18 19:59:36 +01:00
sdhci-internal.h hw: Make class data 'const' 2025-02-16 14:26:07 +01:00
sdhci-pci.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
sdhci.c hw/sd/sdhci: Do not unparent in instance_finalize() 2025-09-24 09:23:20 +02:00
sdmmc-internal.h hw/sd/sdcard: Add basic support for RPMB partition 2025-11-05 09:26:19 +01:00
ssi-sd.c hw/sd/ssi-sd: Return noise (dummy byte) when no card connected 2025-08-12 18:52:12 +02:00
trace-events hw/sd/sdcard: Add basic support for RPMB partition 2025-11-05 09:26:19 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00