mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
__issei_ham_process_ham_rsp() dispatches on hdr->cmd before the message
length is validated. The length comes from the firmware-owned DMA header
read in issei_dma_read(), which only bounds it from above, so firmware
sending a short bus message reaches the dispatch with less than
sizeof(struct ham_bus_message) bytes available.
For a zero-length message kmemdup() returns ZERO_SIZE_PTR, which passes
the NULL check in issei_dma_read(), and the dispatch dereferences it. A
length of one to three bytes gives a slab out-of-bounds read instead.
Reject bus messages shorter than the header before touching it, the way
the individual response handlers already validate their own length.
Fixes:
|
||
|---|---|---|
| .. | ||
| cdev.c | ||
| cdev.h | ||
| dma.c | ||
| dma.h | ||
| fw_client.c | ||
| fw_client.h | ||
| ham.c | ||
| ham.h | ||
| host_client.c | ||
| host_client.h | ||
| hw_heci_regs.h | ||
| hw_heci.c | ||
| hw_heci.h | ||
| hw_msg.h | ||
| issei_dev.h | ||
| Kconfig | ||
| main.c | ||
| Makefile | ||
| pci_heci.c | ||