[PW_SID:1150325] mailbox: riscv-sbi-mpxy: Validate notification data length - #2516
[PW_SID:1150325] mailbox: riscv-sbi-mpxy: Validate notification data length#2516linux-riscv-bot wants to merge 1 commit into
Conversation
mpxy_get_notifications() copies data from shared memory using a length derived from the SBI return value: memcpy(notif_data, mpxy->shmem, sret.value + 16); sret.value is not validated against the shared memory buffer size. A buggy firmware returning a value larger than mpxy_shmem_size - 16 would cause memcpy to read beyond the shared memory mapping. Add a bounds check before the memcpy. Fixes: bf3022a ("mailbox: Add RISC-V SBI message proxy (MPXY) based mailbox driver") Signed-off-by: liutong <liutong@iscas.ac.cn> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "mailbox: riscv-sbi-mpxy: Validate notification data length" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Validate notification data length" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Validate notification data length" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Validate notification data length" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Validate notification data length" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Validate notification data length" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Validate notification data length" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Validate notification data length" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Validate notification data length" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Validate notification data length" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Validate notification data length" |
|
Patch 1: "mailbox: riscv-sbi-mpxy: Validate notification data length" |
PR for series 1150325 applied to workflow__riscv__fixes
Name: mailbox: riscv-sbi-mpxy: Validate notification data length
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1150325
Version: 1